[MAGNOLIA-2740] Tag EDITBAR creates paragraph node on root level Created: 21/May/09 Updated: 23/Jan/13 Resolved: 08/Oct/09 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | taglibs |
| Affects Version/s: | 4.0.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Giancarlo Berner | Assignee: | Fabrizio Giustina |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mg 4.1, Tomcat 6, Windows XP, FireFox |
||
| Issue Links: |
|
||||||||
| 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
|
||||||||
| Description |
|
In an exercise we are doing a "Top Level" paragraph: <%-- Run the script defined in the paragraph In 3.6.5 and prior versions the tag created a paragraph node "exerciseTitle" (type 'ContentNode') as child of the current Web page (type 'Content'). But in 4.1 the paragraph node is placed on the root level.
|
| Comments |
| Comment by Giancarlo Berner [ 04/Oct/09 ] |
|
When do you think will this be resolved? |
| Comment by Giancarlo Berner [ 05/Oct/09 ] |
|
Jackson took a look at the editBar tag. We think there is an easy fix for now. Take a look at the following snippet in the "doEndTag()" method, the two lines starting with "// Add the following line: try { Content localContentNode = Resource.getLocalContentNode(); if(StringUtils.isNotEmpty(this.nodeName)){ catch (Exception e) { // TODO: handle exception // Add the following line: localContentNode = null; }} The reason why you want to "null-out" the localContentNode if the paragraph node is not found, is the following snippet: bar.setNodeName(this.nodeName); try { } bar.setPath(path); In the above snippet, the "localContentNode" is never set to "null". So either the variable "path" represents the paragraph node or the web page, but the script will never get to the "else" statement. >>> Jackson, thanks for looking into this! |