Resources peculiarity

User 2023679 Photo


Registered User
141 posts

I was starting to work on my site in earnest in RSD, and was adding a Visual Lightbox to a page. I followed all the steps:

1. Added an HTML element, and added the body code for the Lightbox.
2. Added the correct folder to the resources.
3. Added the Head code for the Lightbox into the Footer (per another recent thread)

The end result: Lightbox was malfunctioning, the same as when I use to put the Head code in the Head area. When I previewed in a browser and clicked on a photo, the photo pops up, but it does NOT have the nice white frame and navigation controls, and it does not go the next photo. NOT working as it should.

I checked, double checked, and triple checked my code entry in all 3 places. I even uninstalled the program and re-installed it. Couldn't get it to work. I even checked the code on my previous successful Lightbox that I had done in RSD. The code was identical. I was getting a little stressed. :P Just wasn't making any sense.

Finally, I tried something a little unorthodox. I went to where the footer code is entered, and clicked on 'Add Resource'. Then I clicked on the components THAT WERE ALREADY THERE (I know that doesn't make sense, but stay with me) and clicked 'Select'. The dialogue box would close, as it should. I kept on doing this until every individual component (that was already there) was selected.

Here's the weird part. As soon as I finished doing that, the Lightbox starting working perfectly!

I was doing all of this in a test RSD file when I got it to work. So then I opened the website I was working on in RSD, and did those same steps again, and it made it so the Lightbox worked in that RSD file as well. So I was able to repeat it.

Some kind of goofy little bug I guess. For some reason RSD is not recognizing the all of the elements inside the Lightbox resource folder when added in the normal way. The funny thing is, I haven't had any trouble with any of the other resources doing this goofiness in the rest of my project. Only the Lightbox resources files so far. I could be wrong, but it seems like this little bug is connected somehow with the putting of the Head code into the footer area?

In any case, I hope it is something that can be tracked down and fixed. It is a lot of extra work to have to go in and do all of that each time I add a Lightbox. The funny thing is that I had no trouble with the first couple of Lightboxes I added. A head scratcher for sure.
User 1948478 Photo


Senior Advisor
1,850 posts

Michael Brose wrote:
[....]3. Added the Head code for the Lightbox into the Footer (per another recent thread)[....]

The "Head code" for the Lightbox contain both scripts and links to css files. Only the scripts may be moved to the bottom of the <body> section ("the footer"). The links to css files must always remain in the <head> section. If you moved the css-links to "the footer", this may explain styling not being recognized or other odd behavior.
User 379556 Photo


Registered User
1,558 posts

I have no idea of the logic, but I had a similar experience with a CC Menu Builder menu in RSD. The menu showed perfectly in other pages, but wasn't quite right in one page exported from RSD. The whole header from CC Menu Builder (including the javascript references) was copied into the Head box of Settings in RSD, and the whole body section from CC Menu Builder was copied to the HTML Element in RSD.

In Windows (8.1 64 bit) Explorer I found, quite by accident, that any slight change to the name of the export folder completely cured the problem. For example, the original exported folder was ftdiags_exported, and double-clicking on ftdiags.html in that folder brought up the page with the menu showing slightly incorrectly. Selecting the folder in Window Explorer, pressing Ctrl-c and Ctrl-v to duplicate the folder created a folder called, of course, 'ftdiags_exported - Copy'. The ftdiags.html file in that folder showed the menu perfectly. Further experiments showed that it would work perfectly as long as the folder was not called ftdiags_exported. Even removing the final 'd' from the name of the originally exported folder worked the magic.

I at first thought there might be some cross-linked directory on the drive in question, but that proved not to be so. Since I now have a simple cure for the matter it is no longer a problem to me, but I mention it in case there is a connection with the problem mentioned in the first post above.

Frank
User 38401 Photo


Senior Advisor
10,951 posts

Frank Cook wrote:
I have no idea of the logic, but I had a similar experience with a CC Menu Builder menu in RSD. The menu showed perfectly in other pages, but wasn't quite right in one page exported from RSD. The whole header from CC Menu Builder (including the javascript references) was copied into the Head box of Settings in RSD, and the whole body section from CC Menu Builder was copied to the HTML Element in RSD.

In Windows (8.1 64 bit) Explorer I found, quite by accident, that any slight change to the name of the export folder completely cured the problem. For example, the original exported folder was ftdiags_exported, and double-clicking on ftdiags.html in that folder brought up the page with the menu showing slightly incorrectly. Selecting the folder in Window Explorer, pressing Ctrl-c and Ctrl-v to duplicate the folder created a folder called, of course, 'ftdiags_exported - Copy'. The ftdiags.html file in that folder showed the menu perfectly. Further experiments showed that it would work perfectly as long as the folder was not called ftdiags_exported. Even removing the final 'd' from the name of the originally exported folder worked the magic.

I at first thought there might be some cross-linked directory on the drive in question, but that proved not to be so. Since I now have a simple cure for the matter it is no longer a problem to me, but I mention it in case there is a connection with the problem mentioned in the first post above.

Frank


You should be uploading the "contents" of the exported folder not the exported folder itself. That would probably fix your issue, even though it's still a strange anomaly that it's doing that.
User 379556 Photo


Registered User
1,558 posts

Thankyou. I'm sure that's right for where a whole website is being built with RSD.

My mention of the curiosity was because of
1. the parallels with the problem mentioned in the first post in this thread (Note), and
2. the possibility that, if Michael Brose found that my accidentally discovered solution also worked for him, it might help the programmers identify what was causing the original problem.

Frank

Note: especially the fact that identical code, and indeed identical everything else except the name of the folder, gave differing results.
User 2023679 Photo


Registered User
141 posts

Thanks Frank for taking the time to post your discovery. I will check and see if there is any connection with the problem I'm having.

'Per': Thanks for the suggestion on the scripts and header code. I tried what you said, exactly, and it still exhibits the same exact problem. You can check what I've done here to see if I've done it right . . .

https://www.dropbox.com/s/8tqw4a7poe701 … 4.rsd?dl=0

I've also uploaded my test file, with the whole code put into the footer box (I've saved a copy that is still malfunctioning), so you all can see what it is doing possibly.

https://www.dropbox.com/s/qnlju8o576q9q … 3.rsd?dl=0

Click on Preview on the browser (mine goes to Firefox as default). When the Lightbox opens in the browser, click on photo. The pop up is just the photo with no white box around it or navigation or automatic cycling to the next photo. It will be interesting to see if it malfunctions on your computer as well. I'm on Win (8.1 64 bit).

If it does malfunction that way, then go back to the RSD file, go to the Settings Tab, click Add Resource (next to the Footer box), navigate to dan_files, click on vlb_engine (in the dan_files), and then finally click on the vlbdata1.js file and hit Select. That adds that file/script to the footer code. Then click on Preview on the browser again, and the Lightbox should operate normally (fixed!).

I found out through trial and error that I only need to select that one js file, so that's not so bad. But still a little peculiar that I need to do that. There's probably some good reason for it I'm guessing. Thanks guys for taking a look!
User 379556 Photo


Registered User
1,558 posts

Michael's Lightbox-test-3 & 4 both worked perfectly on my computer (also using Firefox on Win 8.1 64 bit), both in preview and in the export folder. That suggests to me that there's no problem regarding the Lightbox code iteself, but perhaps some interference from other code or the like. Such interference now seems demonstrated in my case, as changing a seemingly unrelated button has completely resolved the matter.

I attach a copy of the header and body coding of the items in question. The change in coding for the button was because the RSD file temporarily contained the header and body code of a button copied from another file. The reason for the shared line in the body content of the buttons (<div id="diags-btn" class="buttonContainer diags-btn">) is that I reused (with a different name) the CC Button Builder (.bb) file for creating the changed button as the styling, fonts etc. were to be identical.

I do not understand why the change has resolved the matter, but perhaps it may shed some light on the the problem in the first post of this thread.

Frank
Attachments:
User 2023679 Photo


Registered User
141 posts

Frank, thanks. Did the navigation buttons show and did it automatically change to the next photo by itself?

Yeah, I been doing similarly looking for those kinds of connections. The strange thing is, that in the 2 files I posted and that you checked out (thanks for doing that btw!), there wasn't any previous code. I just opened a fresh RSD file and then added the Lightbox code. So why is it goofing up here, but not on your computer? That doesn't quite make sense to me.

I started working on my website project in RSD, which does have a lot code already entered (imported RLM file), and as I worked with it tonight, for some reason I could add a Lightbox on a page with the all the relevant code (and the head code in the footer area per Scott and Eric's suggestion in another thread) and it worked perfectly fine without me having to do the little extra stuff. So I thought, oh great, I don't have to do that any more. So then I opened a new RSD file, and entered that same exact code, but when I previewed, the original problem was there. Head scratcher. :P
User 379556 Photo


Registered User
1,558 posts

It's probably easiest to show what I did see. I've put a temporary screen-cast at http://fc7777.webspace.virginmedia.com/ showing the effect of hovering the mouse over the buttons and clicking on the buttons. I'm not sure about the changing to the next photo by itself. I didn't see any such change.

Frank
User 379556 Photo


Registered User
1,558 posts

Strangely my original problem has returned, even though, as far as I'm aware, I changed nothing in the RSD file. I exported again, only to find that the name of the export folder needed to be changed for the menu to display properly.

Having concluded that this seemingly random behaviour involves folder names, for the first time I have now in RSD Settings put a name that differs slightly from the default name, which was, of course, the name of the .html page. So far this has done the trick, but I will have to wait to see whether this tentative work-around has a lasting effect.

Frank

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.