DMXzone Lightbox Support Product Page


Problem with latest jsscript from Nivo slider

Reported 06 Oct 2013 16:58:31
have this problem
06 Oct 2013 16:58:31 Ian Musk posted:
Despite reports this is solved it is not. Latest pack from nivo slider messes up lightbox. I have site with both light box and nivo slider. When nivo slider allows itself to update latest pack then lightbox stops working in so much as you click on a thumbnail and the jpeg opens in a new html. Only the jpeg you clicked the thumbnail for opens. There is no lightbox functionality. When I manually replace the latest pack from nivo with a previous version from a back up then no problem with nivo or with lightbox (site is is not responsive, so don't know if all functionality of nivo is there, but it looks like it.). This is frustrating because I hadn't seen that lightbox was messed up. The client told me. Now I updated nivo and the lightbox problem is back.


Replied 08 Oct 2013 10:15:05
08 Oct 2013 10:15:05 Teodor Kuduschiev replied:
Hello Ian,

The issue you are having is caused by old dmxzone lightbox files on your site.
You need to update the lightbox to the latest version so it is jquery 1.10.1 compatible. If you already did - please delete the folder called "dmx" Close and restart DW and reopen the page, so lightbox can place the new files there. Then upload the newly generated files to your server.
Replied 08 Oct 2013 11:42:32
08 Oct 2013 11:42:32 Ian Musk replied:
Deleting the dmx folder is not a good idea unless you tell people to back up their customized presets that are buried in this folder!
I updated both Nivo and Lightbox to current latest versions as these two seemed to be in conflict with each other.
After I updated Nivo when I opened a page with Niov on it DMX automatically put new files in ScriptLibrary folder and informed me of this and told me to upload them.
After I updated Lightbox and had deleted the dmx folder, when I opened a file with Lightbox on it there were no messages or attempts to rebuild dmx folder. In the end I had to create a new blank page and insert a new Lightbox into this page to force Lightbox to create a new dmx folder.
Then I uploaded the dmx and ScriptLibrary folders to the live site and everything seems to be working ok. Thank you.

BUT! That's not the end of it. There still remains another problem which now that I am sure everything is ok with Nivo and Lightbox I have to let you know about it as I thought it was all part of the same "package". This site has some pages with Nivo on them and som pages with Lightbox on them. All the pages are controlled with Dreamweaver tempates (.dwt files). The Nivo "head" code and the Lightbox "head" code is inserted into the template controlled region: <!-- InstanceBeginEditable name="head" -->. But what happens when I open a Nivo page or a lightbox page is that I get the warning "Making this change would require changing code that is locked by a template or a translator. The change will be discarded.". Now I didn't make any changes, all I did was open the html file. What seems to be happening is that Nivo and Lightbox is automatically trying to put the line<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script> into the non editable head area and at the same time it is deleting this line from the editable head region. If I do nothing and close the file without saving changes then the head is as it was. If I do nothing and close the file and do save the changes (that Nivo/lightbox wanted to make when I opened the file) then what happens is the line <script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script> is no longer in the head (editable region) and nvio/lightbox do not work because the haven't got enough jquery to feed on.
My work around is to have a snippet readily available with <script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script> and I have to remember to paste it in the head editable region after I open the file and make the other changes to the file that caused me to open it in the first place.
So, can you change how Nvio and Lightbox (and others) try to check and update the head? It seems strange that it only <script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script> that is a problem. Everything else I put in the editable head region for Nivo/Lightbox is ok and doesn't get messed up.
Replied 08 Oct 2013 14:10:25
08 Oct 2013 14:10:25 Ian Musk replied:
This business about <script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script> and the editable head region also applies to latest version of Sliding Billboard as well Nivo and Lightbox.
Replied 16 Oct 2013 12:31:44
16 Oct 2013 12:31:44 Ian Musk replied:
This is also happening on TABS with latest version. When DWT template is used for a page all the TABS code is put in the editable head area. But when you reopen page DMX strips out the line abot latest pack. It does not do anything with all the other lines:
<link rel="stylesheet" type="text/css" href="../Styles/dmxTabs.css" />
<link rel="stylesheet" type="text/css" href="../Styles/jqueryui/black-tie/black-tie.css" />
<script type="text/javascript" src="../ScriptLibrary/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="../ScriptLibrary/jquery-ui-core.min.js"></script>
<script type="text/javascript" src="../ScriptLibrary/jquery-ui-effects.min.js"></script>
<script type="text/javascript" src="../ScriptLibrary/dmxTabs.js"></script>

Replied 16 Oct 2013 14:24:22
16 Oct 2013 14:24:22 Teodor Kuduschiev replied:
Hello Ian,

There is no such a known issue with dwt files.
There must be something wrong the way your template/code is setup.
Replied 16 Oct 2013 15:16:53
16 Oct 2013 15:16:53 Ian Musk replied:
Thank you for looking into this.
Based on your comments I set up a test. What I did was set up a new virgin template and made a new virgin test page from it. Then I added DMX tabs and no problem. So then I added, line by line, testing what happened for each line. In the end I have concluded that when the Dreamweaver respond.js is included in the locked part of the head then the problem with DMX I described starts. This is the line of code <script src="../css/respond.min.js"></script>. If this line is included in the editable head region then no problem. It is only when this line is in the templates part of the head. If there is no DMX object on the page respond.js in the locked part does not cause any problem. When it is in the locked part my test page gives me two error messages when I open the page to edit it in DW. The first one says "Making this change would require changing code that is locked by a template or a translator. The change will be discarded." The second ones says "While executing onLoad, the following JavaScript error(s) occurred: At line 943 of the file C:/Program Files (x86)/Adobe/Adobe Dreamweaver CS6/Configuration/Commands/dmxUpdateHead.htm: The object is not currently contained in a document."
In conclusion: It seems to be the combination of respond.js in the fixed and DMX that is causing problems. Either one of these without the other is ok, but when they are both together it gets very frustrating and tiresome.
Replied 16 Oct 2013 19:11:48
16 Oct 2013 19:11:48 Ian Musk replied:
Just as an after thought I tried the above test files in DW CC as the testing I wrote about had been done in DW CS6 Cloud. But the results are exactly the same.
Replied 17 Oct 2013 08:41:45
17 Oct 2013 08:41:45 Teodor Kuduschiev replied:
Hello Ian,
Please move the script after the head editable region in your dwt file, then update the child pages.

<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<script src="../respond.min.js"></script>

Replied 17 Oct 2013 17:26:25
17 Oct 2013 17:26:25 Ian Musk replied:
Yes did that and it works! Had in the meantime found same problem on an older site that was built before started using respond.js. With your suggestion today I quickly found the culprit this time was the Google Analytics code that was running before the head editable region. Moved Analytics code to after head editable region and problem solved. I know that DW seems to insert head editable region at (to me) random location in head and when you convert file to template lots of stuff can be in there. So now it is good to know what to check and how to fix by having the head editable high in the head. Thank you.
Replied 12 Nov 2014 06:37:38
12 Nov 2014 06:37:38 Greta Garberini replied:
So now this is a year later. Problem I got is connected to the above mntioned automatic insertion of
<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
This upsets other functions (not from DMXzone) so that some pages are unusable. I am forced to use royalslider because nivo from dmxzone does not support the display of more than one slide at once. (See attachemnet) I would be gladly do it with dmx nivo but I could not figure out how to do it. So whenever I open the page in dreamweavcer, dmx fiddles in the line <script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script> which is annoying because it creates a conflict with the other jQuery royl slider uses. The effect is, that the slider stops working and all pictures are displayed in several rows.
Any idea how to solve this? As I said, I would be glad to use NivoSlider from DMX but it does not offer this feature.

Reply to this topic