Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Source code editor bug?
#1
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
Reply
#2
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
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
(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?
Reply
#4
http://webmasters.stackexchange.com/ques...t-browsers

No clue, seems unrelated, i would begin looking at the plugin itself.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
Hmm i just tried to reproduce this and i couldnt. Are you sure the "plugins/nanoslider" folder exists and wasnt accidentally removed or renamed?
Reply
#6
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.
Reply
#7
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?
Reply
#8
Well what exactly did you edit then ?
Your path to your plugins files is wrong or something.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
I think the plugins directory was renamed and redefined in common.php (?) and since the nanoslider plugin uses hardcoded plugins path it wont work.
Reply
#10
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
Reply
#11
(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.
Reply
#12
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.
Reply
#13
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.
Reply
#14
Is the Nanoslider plugin updated to 1.2? That's when I started to see problems.
Reply
#15
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
Reply
#16
(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...
Reply
#17
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.
Reply
#18
Interesting. And all your other plugins are ok?
Reply
#19
(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?
Reply
#20
(2013-10-15, 07:06:25)jliwanag77 Wrote: Interesting. And all your other plugins are ok?

jliwanag77, did you rename the plugin directory?
Reply
#21
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.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#22
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.
Reply
#23
(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!
Reply
#24
(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?
Reply
#25
(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.
Reply




Users browsing this thread: 2 Guest(s)