Jump to content

Home page icons not working

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 post
Share on other sites

If there are no other choices, then the language (flag) chooser should not be there, and if no other choices, the currency chooser should show a circle-diagonal-line mouse cursor.

Link to post
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


Link to post
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.


Edited by bsmither
Link to post
Share on other sites

There was no Readme.md or readme.js file in that folder.

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 post
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 post
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 post
Share on other sites

Before clearing the cache


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



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 post
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 post
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. 

Edited by NiteFox
Link to post
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.




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



Link to post
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 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.

Edited by bsmither
Link to post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...