Posts: 10
Threads: 2
Joined: Oct 2013
I noticed that when using the Nano Slider, I found an odd bug when you edit the theme code in the built in source code editor. I edited one line of css code, irrelevant to the Nano Slider, saved and updated, then I noticed the Nano Slider was gone. It did not throw any errors or anything, but it's just gone. I run 2 sites and verified it was something in the built in source code editor.
I have tried to flush the cache, and delete my browsers cache / cookies as well with no luck. I'm thinking I should delete my .htaccess file so it recreates a new one but am unfamiliar with what happens and am a bit scared to do so.
Any thoughts on how to get the Nano Slider back? It's still showing in the source code, but for some reason the css is affected now.
www.thebrashgroup.com
Posts: 6,266
Threads: 181
Joined: Sep 2011
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.thebrashgroup.com//plugins/na...slider.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.thebrashgroup.com//plugins/na...efault.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.thebrashgroup.com//plugins/na...er.pack.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.thebrashgroup.com//plugins/na...slider.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.thebrashgroup.com//plugins/na...oslider.js
Uncaught ReferenceError: nanoSLIDER is not defined (index):21
Posts: 10
Threads: 2
Joined: Oct 2013
(2013-10-15, 01:31:11)shawn_a Wrote: Failed to load resource: the server responded with a status of 404 (Not Found) http://www.thebrashgroup.com//plugins/na...slider.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.thebrashgroup.com//plugins/na...efault.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.thebrashgroup.com//plugins/na...er.pack.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.thebrashgroup.com//plugins/na...slider.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.thebrashgroup.com//plugins/na...oslider.js
Uncaught ReferenceError: nanoSLIDER is not defined (index):21
Wow..with me having limited knowledge of get-simple, how did you go about finding that?
The odd thing is that I did not touch the plugin at all or any css relevant to it. Is this an error on the developer of the plugin?
Posts: 6,266
Threads: 181
Joined: Sep 2011
http://webmasters.stackexchange.com/ques...t-browsers
No clue, seems unrelated, i would begin looking at the plugin itself.
Posts: 104
Threads: 6
Joined: Aug 2013
Hmm i just tried to reproduce this and i couldnt. Are you sure the "plugins/nanoslider" folder exists and wasnt accidentally removed or renamed?
Posts: 10
Threads: 2
Joined: Oct 2013
Hi Kolyok,
Very sure it exists. For some reason, it produces an extra "/" when the error occurs, and it is somehow related to editing in source code within get-simple, not an outside editor (using Coda). I'm testing on two different sites: brightux.com & thebrashgroup.com
It happened on both of them.
Posts: 104
Threads: 6
Joined: Aug 2013
Well the thing is that even without the extra forward slash the nanoslider files seems to be inaccessible (404)
See: http://www.thebrashgroup.com/plugins/nan...slider.css
Theres any other plugins you have installed?
Posts: 6,266
Threads: 181
Joined: Sep 2011
Well what exactly did you edit then ?
Your path to your plugins files is wrong or something.
Posts: 104
Threads: 6
Joined: Aug 2013
2013-10-15, 04:52:46
(This post was last modified: 2013-10-15, 05:00:06 by Kolyok.)
I think the plugins directory was renamed and redefined in common.php (?) and since the nanoslider plugin uses hardcoded plugins path it wont work.
Posts: 6
Threads: 2
Joined: Apr 2013
2013-10-15, 06:19:23
(This post was last modified: 2013-10-15, 06:19:48 by Kris_B.)
I understand it works well as long as you don't edit the theme from within the GetSimple admin page.
Can you check that you have one .htaccess file in each sub-directory of the plugin?
Check also the content of the file (Allow from all).
I look at http://www.brightux.com/
There are also a lot of errors but not related to nanoslider:
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.brightux.com/theme/twitter-bo....slider.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.brightux.com/theme/twitter-bo...slider.css
Uncaught ReferenceError: jQuery is not defined jquery.parallax-1.1.3.js:69
Uncaught ReferenceError: jQuery is not defined jquery.localscroll-1.2.7-min.js:9
Uncaught ReferenceError: jQuery is not defined jquery.scrollTo-1.4.2-min.js:11
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.brightux.com/theme/twitter-bo...er.pack.js
Uncaught ReferenceError: $ is not defined
Posts: 6
Threads: 2
Joined: Apr 2013
(2013-10-15, 04:35:46)shawn_a Wrote: Well what exactly did you edit then ?
Your path to your plugins files is wrong or something.
The path to the plugin seems to be ok: nanoslider.php is run, causing the errors.
Posts: 10
Threads: 2
Joined: Oct 2013
2013-10-15, 06:31:48
(This post was last modified: 2013-10-15, 06:33:34 by jliwanag77.)
Hey all, I appreciate the feedback.
I do have other plugins installed, and are working perfectly. Brightux.com is where I was testing the entire site out as a whole, and I just decided to redo everything from scratch with thebrashgroup.com.
I will check when I get home from work tonight for the .htaccess files.
Thanks!
Just to answer some of your questions..when it happened all I edited was the body {} in the custom-styles.css file. When I resaved within the admin source code editor, that's when I refreshed and found the bug had happened.
Posts: 104
Threads: 6
Joined: Aug 2013
I have a few custom themes (sometimes i edit them with GS theme editor) and none of them got any problems with nanoslider. Im still trying to figure it out but kinda out of ideas.
If plugins folder wasnt renamed i dont see how the plugins folder isnt accessible at all.
Posts: 10
Threads: 2
Joined: Oct 2013
Is the Nanoslider plugin updated to 1.2? That's when I started to see problems.
Posts: 104
Threads: 6
Joined: Aug 2013
Its updated yeah. Also if there wouldnt be .htaccess or it would contain Deny from all it would throw a Permission denied (403) error instead of Not Found (404) so its wierd
Posts: 6
Threads: 2
Joined: Apr 2013
(2013-10-15, 06:40:24)jliwanag77 Wrote: Is the Nanoslider plugin updated to 1.2? That's when I started to see problems.
I noticed an unnecessary file in the v1.2.0 zip-file: README.md
You can remove it, but I don't think this will change anything...
Posts: 104
Threads: 6
Joined: Aug 2013
2013-10-15, 07:02:50
(This post was last modified: 2013-10-15, 07:03:22 by Kolyok.)
Ok so i renamed my plugin folder, redefined it in GetSimple common.php and see the magic:
Almost the same errors so i think its the folder thing.
Posts: 10
Threads: 2
Joined: Oct 2013
Interesting. And all your other plugins are ok?
Posts: 104
Threads: 6
Joined: Aug 2013
2013-10-15, 07:14:36
(This post was last modified: 2013-10-15, 07:37:11 by Kolyok.)
(2013-10-15, 07:06:25)jliwanag77 Wrote: Interesting. And all your other plugins are ok?
Most of them fine but those plugins that load css and js files directly into content and not queued will be affected too except if you modify/update the plugin files to take the new path.
Lets say your new plugins folder name is modules then you would need to modify the plugin files paths from:
PHP Code: $style = '<link rel="stylesheet" type="text/css" href="'.$SITEURL.'plugins/simple_contact/css/simple_contact.css"></link>'; $script = '<script type="text/javascript" src="'.$SITEURL.'plugins/simple_contact/js/jquery.validate.min.js"></script>';
to
PHP Code: $style = '<link rel="stylesheet" type="text/css" href="'.$SITEURL.'modules/simple_contact/css/simple_contact.css"></link>'; $script = '<script type="text/javascript" src="'.$SITEURL.'modules/simple_contact/js/jquery.validate.min.js"></script>';
Maybe in the future GetSimple will have a variable for this?
Posts: 6
Threads: 2
Joined: Apr 2013
(2013-10-15, 07:06:25)jliwanag77 Wrote: Interesting. And all your other plugins are ok?
jliwanag77, did you rename the plugin directory?
Posts: 6,266
Threads: 181
Joined: Sep 2011
Perhaps your htaccess is rewriting some stuff it shouldn't be.
Maybe this is anecdotal and the site was already broken but cached.
There only a few things between a request and the actual location.
If I had to guess, id say you are installed into a subfolder and your siteurl in settings is wrong.
Posts: 104
Threads: 6
Joined: Aug 2013
2013-10-15, 07:35:23
(This post was last modified: 2013-10-15, 07:36:58 by Kolyok.)
Btw something like this would also solve this:
PHP Code: $site_url = $SITEURL; $plugin_folder = basename(GSPLUGINPATH); $plugin_url = $site_url.$plugin_folder;
then in the plugin use the $plugin_url instead:
PHP Code: $style = '<link rel="stylesheet" type="text/css" href="'.$plugin_url.'/simple_contact/css/simple_contact.css"></link>'; $script = '<script type="text/javascript" src="'.$plugin_url.'/simple_contact/js/jquery.validate.min.js"></script>';
This way plugins folder name is taken directly from GSPLUGINPATH so no need for manual rewrite if changed.
Posts: 10
Threads: 2
Joined: Oct 2013
2013-10-15, 07:51:48
(This post was last modified: 2013-10-15, 07:53:14 by jliwanag77.)
(2013-10-15, 07:16:59)Kris_B Wrote: (2013-10-15, 07:06:25)jliwanag77 Wrote: Interesting. And all your other plugins are ok?
jliwanag77, did you rename the plugin directory?
I did not
(2013-10-15, 07:33:14)shawn_a Wrote: Perhaps your htaccess is rewriting some stuff it shouldn't be.
Maybe this is anecdotal and the site was already broken but cached.
There only a few things between a request and the actual location.
If I had to guess, id say you are installed into a subfolder and your siteurl in settings is wrong.
I was using custom permalink %slug%, but I now removed that, flushed cache, and now I actually see the hero unit as a white box. Checking the source, it does not seem to be parsing the nanoslider correctly, but looks like we are getting somewhere!
Posts: 10
Threads: 2
Joined: Oct 2013
(2013-10-15, 07:35:23)Kolyok Wrote: Btw something like this would also solve this:
PHP Code: $site_url = $SITEURL; $plugin_folder = basename(GSPLUGINPATH); $plugin_url = $site_url.$plugin_folder;
then in the plugin use the $plugin_url instead:
PHP Code: $style = '<link rel="stylesheet" type="text/css" href="'.$plugin_url.'/simple_contact/css/simple_contact.css"></link>'; $script = '<script type="text/javascript" src="'.$plugin_url.'/simple_contact/js/jquery.validate.min.js"></script>';
This way plugins folder name is taken directly from GSPLUGINPATH so no need for manual rewrite if changed.
Forgive my ignorance, would this be located in the nanoslider.php file?
Posts: 104
Threads: 6
Joined: Aug 2013
2013-10-15, 08:00:49
(This post was last modified: 2013-10-15, 08:02:43 by Kolyok.)
(2013-10-15, 07:54:04)jliwanag77 Wrote: (2013-10-15, 07:35:23)Kolyok Wrote: Btw something like this would also solve this:
PHP Code: $site_url = $SITEURL; $plugin_folder = basename(GSPLUGINPATH); $plugin_url = $site_url.$plugin_folder;
then in the plugin use the $plugin_url instead:
PHP Code: $style = '<link rel="stylesheet" type="text/css" href="'.$plugin_url.'/simple_contact/css/simple_contact.css"></link>'; $script = '<script type="text/javascript" src="'.$plugin_url.'/simple_contact/js/jquery.validate.min.js"></script>';
This way plugins folder name is taken directly from GSPLUGINPATH so no need for manual rewrite if changed.
Forgive my ignorance, would this be located in the nanoslider.php file?
Yes in nanoslider.php.
Im still trying to reproduce those errors but untill now only the already mentioned folder rename caused problem for me.
Edit: I just checked your site and it seems now its loaded but jquery isnt.
I see jquery its loaded in footer template. Try to move it to the header template so its loaded before anything else.
|