Hi Jan
Thanks for your reply.
- Chrome, Firefox and Safari behave the same.
- It happens on all pages, even in the DMS.
- It happens with other admin languages too.
- I did not customize the alert command.
- It happens in Magnolia 4.5.8 EE
What I found out is the following:
In the javascript.js on line 6305 the following code starts (it's from the
tree.js):
[code]
function mgnlAlertCallbackMessage(html) {
var messagePattern = '<input type="hidden" id="mgnlMessage" value="';
// check if alert message was sent back
if (html.indexOf(messagePattern) != -1) {
var start = html.indexOf(messagePattern);
var end = html.indexOf("\" />", start);
var msg = html.slice(start + messagePattern.length, end);
alert(msg);
html = html.slice(end);
}
return html;
}
[/code]
The message is saved in that hidden input field as value. The code tries to
extract the message by getting the start and end index. The start index comes
out correctly (as 0) but the end index is -1, because the expression [quote]"
/>[/quote] can not be found. So while debugging the JS I copied out the value
of the html variable and saw that the empty space on the expression is missing.
The end tag looks like this: [quote]"/>[/quote]
The value in the html variable starts as follows:
[code]
<input type="hidden" id="mgnlMessage" value="The workflow was successfully
started. The item was sent to the appropriate inbox."/><div
id="mgnlTreeCont...more html markup
[/code]
You can see that the empty space is missing in the end tag.
Unfortunately I really dont know when and where the removal of this empty space
happens.
In the AdminTreeMVCHandler.java on line 771 I see that the space is there:
[code]
if (view.equals(VIEW_COPY_MOVE)) {
// pass new path to tree.js for selecting the newly created node
// NOTE: tree.js checks for this pattern; adapt it there, if
any changes are made here
html.append("<input type=\"hidden\" id=\"mgnlSelectNode\"
value=\"");
html.append(newPath);
html.append("\" />");
}
[/code]
Cheers, Chris
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=856352aa-58f8-4de5-a4a6-e2086955b65a
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------