Jump to content

Home page icons not working


windsurfer

Recommended Posts

They are javascript-powered. Does the mouse cursor change to a hand when hovering over any of them?

If the javascript has crashed, the browser's Developer Tools Console Panel should mention what broke.

If you only have one language enabled, the icon will not have any other language flag to show. Same with the currency. The shopping basket should work, however.

Link to comment
Share on other sites

The mouse does change to a hand when i cursor over it.

That flag has always been there, the only thing i did was replace the US flag with the Canadian flag

The Cart icon doesn't work and neither does the link to go to my profile.

On my home page i get this

image.thumb.png.75d18df7ef911ec197582e849251cf51.png

Link to comment
Share on other sites

Let's have a close look at the contents of the folder /skins/foundation/js/. I am specifically looking for the existence of a file with a name that starts with readme and ends in .js.

There could already be a file named readme.md, but not ending in .js.

If there is such a file, rename it so that there is no .js at the end of the filename.

This is why javascript is crashing: the contents of readme.md is getting loaded into the javascript aggregate.

If not, then we need to look at the file /classes/gui.class.php, near line 186:

            //Put in the javascripts
            $js = glob('skins/'.$this->_skin.'/'.'{js,scripts}/*.js', GLOB_BRACE);
            foreach ($GLOBALS['hooks']->load('class.gui.javascripts') as $hook) {
                include $hook;
            }

            $GLOBALS['smarty']->assign('JS_SCRIPTS', $js);

In line 2 above, the glob() function looks for anything that ends in .js. So, the question is:

Is the content of readme.md getting loaded erroneously via the glob() function, or
Has the content of readme.md somehow got copied into the content of 3.cubecart.validate.js, or
Has the name of the file readme.md changed to have a suffix of .js.

 

Link to comment
Share on other sites

There was no Readme.md or readme.js file in that folder.
image.png.7b69b781d192a1096af12ad1faa2b556.png

The code above is nowhere to be found in the 3.cubecart.validate.js file.

I backed up the site to my local drive and did a text crawl and the only place that code shows up is in the gui.class.php file.

 

 

 

 

Link to comment
Share on other sites

Please verify that in the folder /skins/foundation/js/ there is a folder named /vendor/ and there are a number of files in there.

Please examine the contents of the file script.js. It doesn't belong with Foundation.

On the other hand, if you intentionally added it, possibly from Mican, reconsider this decision.

Link to comment
Share on other sites

The folder /styles/ doesn't belong with Foundation. However, it's presence shouldn't be causing the javascript problem.

The combined javascript file, /cache/817c6.js_foot.foundation_20200504140945.js, which has the rogue code that is crashing javascript, is dated May 4, 2020. So, it seems this may be a case that this file was created when there was some sort of irregularity in the Foundation source javascript files and/or file contents.

So, please have CubeCart clear its internal cache, allowing this combined file to be rebuilt (with a new datestamp in the filename).

Link to comment
Share on other sites

Before clearing the cache

Screenshot_1.png.1447790bff4dfac2f052ad9c67d2057c.png

After clearing the cash and adding an item to the basket, the icons still don't work.

Screenshot_30.png.6391048567bfee1d6c53562106acdfc5.png

 

I never get any email notifications when somebody responds to any of my posts so i am done for tonight. I have to keep hunting to see if there is an answer. Thanks for the help so far.

Link to comment
Share on other sites

I will have to check something, but clearing the cache should have deleted the highlighted file. After clearing the cache, you should not see that file in the directory.

While still in admin, and not viewing any part of the storefront, clear the cache. Examine the /cache/ folder. That file should not be there.

If it is still there, that's a problem. It may indicate you are running a version of CubeCart earlier than v6.2.9.

 

 

Link to comment
Share on other sites

Have you activated any plugins lately or are you using any plugins that came bundled with 3rd party skins?

 

I had a user who had a Suggestive Search plugin which came bundled with an 3rd party skin which loads js from a php file which caused near enough the same issue as the combine function used in the footer is file only accepts css/js files although it did throw an error in the error log file for the plugin.

 

When replying to posts you should see option to be notified of replies or click the follow link on post page. 

Link to comment
Share on other sites

After clearing the cache that file was not there but it showed up after i added something to my basket. I am running version 6.2.9

The only thing i have added lately was the e-payment but it everything was still working after that. It just started acting up the other day. I do have to say that the Paypal started acting up where when i selected the Paypal icon the Paypal window would show up for about 2 or 3 seconds and then would disappear. 

When i add something to the basket and click on the basket icon this shows up in the address bar https://www.mysurplus.ca/#

Also i do select to be notified about replies but i never get an email anymore when somebody replies to my post and there is nothing in my spam folder.

 

image.png.bed88a3534ac80daa9d7d795f36ebb0f.png

 

Not sure what is going on now all of a sudden but now i get this.

 

image.thumb.png.b0c9d5c057c14f851f4a757da7b4c51e.png

Link to comment
Share on other sites

This is what is supposed to be the last few characters in the /cache/pre.js_foot.foundation_date.js (where pre is specific to you, and date is the last modified time of any of the source javascript files):

{$(this).parents('form:first').validate().resetForm();});});

This is the last few characters in your file, which is what is crashing javascript:

{$(this).parents('form:first').validate().resetForm();});});JavaScript files in the js folder are auto loaded into the template.Numeric prefix on JS files specifies auto load order.

The extra content is exactly what is the contents of readme.md, which seems to not be found.

Link to comment
Share on other sites

Those messages are not relevant to CubeCart.

Did you overwrite the installation we were working with? Or is this latest installation in a separate folder?

Do you still have the problematic installation? You mentioned backing it up to a local workstation.

If so, perhaps you could do a "text crawl" looking for all instances of:

JavaScript files in the js folder are auto loaded into the template.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...