Online Page Editor Add-on Support Product Page

In progress

Having problems putting installer in place- getting template locked message again

Reported 12 Jan 2014 12:41:14
1
has this problem
12 Jan 2014 12:41:14 Chuck Borrelli posted:
This is similar to what I experienced here (www.dmxzone.com/support/18529/topic/52698), but I do have the head region.

The page is:
www.petercunicelli.dreamhosters.com/about.php

When calling the activator for online page editor add-on I get the following error:
07:37:08.135 ReferenceError: require is not defined dmxPageEditor.js:9


I am using Dreamweaver CC, OS X 10.9.1. Every time I edit or open the page I get the message
Making this change would require changing code that is locked by a template or translator. The change will be discarded

That message appears on other pages I have done, but the page editor still works. On this one, it does not.

Replies

Replied 12 Jan 2014 12:51:09
12 Jan 2014 12:51:09 Chuck Borrelli replied:
For some godawful typical reason, the following file call is being deleted:
<script type="text/javascript" src="ScriptLibrary/require.js"></script>

It would be created, and them automatically removed.

Adding it manually seems to work.

Again, your extensions are great, your support is great, but these little special behaviors are annoying.
Replied 13 Jan 2014 10:37:30
13 Jan 2014 10:37:30 Teodor Kuduschiev replied:
Hello,

The issue you are having is that there are includes OUTSIDE of the editable region, that need to be located AFTER the require.js, but they are locked by the template, as they are not in the editable region. When DW tries to move the require.js before those locked includes, it sees that they are locked and does not move it. This is why you see the error saying "Making this change would require changing code that is locked by a template or translator. The change will be discarded"

Here is what you can do:
Move the following includes inside the editable region named "head". Then when DW needs to place require.js it will be able to put it where it needs to be.


<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script type="text/javascript" src="ScriptLibrary/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxNavigationMenu.js"></script>
<!--[if lt IE 7]><script type="text/javascript" src="../Styles/IE7.js"></script><![endif]-->

Replied 13 Jan 2014 15:49:43
13 Jan 2014 15:49:43 Chuck Borrelli replied:
EXCEPT that those includes are needed for the MENU which is on the template.
IF I do it the way you suggest, any page that I add based on the template, I would also have to manually have to add the includes listed above to each subsequent template.

However, it is just easier to add the single require.js to each head.

Another possibility would be to add the reference to require.js to the template... if so, it should be BEFORE the request for Jquery?
Replied 13 Jan 2014 15:54:30
13 Jan 2014 15:54:30 Teodor Kuduschiev replied:
Only require.js should be before the jquery-latest.pack.js, the rest of the js includes should be after it.
Replied 13 Jan 2014 16:06:59
13 Jan 2014 16:06:59 Teodor Kuduschiev replied:
By the way, if the only reason for creating a dreamweaver template is to use the Navigation Menu, you can just use it as a server-side include
www.dmxzone.com/go/19193/using-universal-css-navigation-menu-as-an-included-file-in-dw-template

Reply to this topic