[MAGNOLIA-1092] Corrupted pages after executing a workflow command Created: 27/Sep/06 Updated: 23/Jan/13 Resolved: 27/Oct/06 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | workflow |
| Affects Version/s: | None |
| Fix Version/s: | 3.0 RC4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Fabrizio Giustina | Assignee: | Fabrizio Giustina |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
During the execution of a workflow command the standard magnolia context is wrapped in a WorkItemContext and, for this reason, pages shown after the execution of the command are broken. The reason is that MgnlContext.getContextPath() only works when the context is an instance of WebContextImpl and returns an empty String when it finds the WorkItemContext implementation (although it wraps a WebContextImpl). This makes javascript and images links broken. |
| Comments |
| Comment by Fabrizio Giustina [ 27/Sep/06 ] |
|
screenshot of the inbox page after a workflow command execution. |
| Comment by Fabrizio Giustina [ 27/Sep/06 ] |
|
Partially fixed in MgnlContext by unwrapping an eventual wrapped web context. There is a note and a TODO in info.magnolia.module.workflow.MgnlParticipant: // set parameters in the context Any reason for not changing the first call to MgnlContext.getInstance() instead of MgnlContext.getSystemContext()? Philipp? Nico? Any hint? |
| Comment by Philipp Bracher [ 28/Sep/06 ] |
|
MgnlContext.getInstance() will fall back to the SystemContext normally (notice this well known warning log). I'm a bit confused because I thought the following code would always be true, but as you descibe it isn't: MgnlContext.hasInstance() == false Anyway we must save the original context and reset it afterward (setting to null if none was set). |
| Comment by Fabrizio Giustina [ 06/Oct/06 ] |
|
fixed in svn |
| Comment by Magnolia International [ 27/Oct/06 ] |
|
reopening to change fix version to rc4 |