Jump to content

Review form not showing


kurraglen

Recommended Posts

I have reviews turned on but a customer informed me that he couldn't leave a review.

When the Write a Review button is clicked, instead of the review form showing, the page scrolls to the top.

I am operating the latest version of Cubecart  6.4.4 with Noodlemans skin. If I change to the default skin, the reviews are able to be added.

Link to comment
Share on other sites

The jQuery library is not loading.

Please examine the template file main.php. There should be these statements:

      {include file='templates/element.css.php'}
      {include file='templates/content.recaptcha.head.php'}
      {include file='templates/element.google_analytics.php'}
      {include file='templates/element.js_head.php'}
   </head>
   <body>

It is the element.js-head.php template file that is not getting built.

I notice that there are additional statements:

<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=5c061b5841333f001182d6f1&amp;product=inline-share-buttons" async="async"></script>
<script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js" async=""></script>

Please double check that the additional statements did not damage any of the {include} tags.

Link to comment
Share on other sites

The statement is present?

{include file='templates/element.js_head.php'}

Does the template element.js_head.php actually exist?

This file exists:

https://www.kurraglenindustries.com.au/shop/cache/c40ca.js_foot.noodleman_v6_20200802191832.js

So why doesn't the matching c40ca.js_head.noodleman_v6_zzz.js exist? (where zzz is the date/time the element.js_head.php file was last edited when created)?

Look in the /cache/ folder for a file that starts with "c40ca.js_head.noodleman_v6".

Link to comment
Share on other sites

Yes the element.js_head.php file is in the templates folder. Code in it is:

{assign var=js_head value=[ 'skins/{$SKIN_FOLDER}/js/vendor/modernizr.js',
                            'skins/{$SKIN_FOLDER}/js/vendor/jquery.js']}
{foreach from=$HEAD_JS item=js}
    {$js_head[] = $js}
{/foreach}
{combine input=$js_head output='cache/js_head.{$SKIN_FOLDER}.js' age='604800' debug=false}

Also there is a file: c40ca.js_head.noodleman_v6_20190831161300.js  in the cache folder.

Link to comment
Share on other sites

Ok, getting it narrowed down.

We assume that the file element.js_head.php is getting included, processed (because we see that the file exists in the cache), but the name of that file is not replacing the {include} statement. Yet, js_foot is.

By the way, this all works on my copy of Noodleman's skin.

It's hard to tell, but can you be certain you are using the latest version of his skin? Not that I would know if there is a difference.

In admin, Error Log, System Error Log tab, see if there are any log entries that pertain to JS or CSS files.

Link to comment
Share on other sites

Thanks Brian. The reviews used to work and I haven't changed any of the files. As far as I know, it is the latest version.

I turned on debug mode, but I cannot see any errors relating to js or css files.

 

Link to comment
Share on other sites

A thought came to mind, which I will have to create a specific scenario to confirm.

But as an experiment, in the file element.js_head.php, make a small and insignificant edit - like inserting a space at the beginning of a line. This tells the text editor that the file needs saving. Save the file. This will give that file a different date/time stamp which the Smarty {combine} function will notice and rebuild the file.

Hopefully then, Smarty will properly deliver the result to the main.php template.

 

Link to comment
Share on other sites

I am out of ideas on what to suggest to get the problem to reveal why it is happening.

As another experiment:

In element.js_head.php, there is the last part of the last line that says: debug =false. Make that debug=true.

Doing this should tell Smarty to not combine all the listed JS files, but rather output them as separate <link> statements.

When I said: "In admin, Error Log, System Error Log tab, see if there are any log entries that pertain to JS or CSS files." I did not mean to examine the debug section at the bottom of the page. I meant to look at the System Error Log in admin.

Link to comment
Share on other sites

Hi Brian,

Sorry for the slow reply, had a busy week. I did try what you suggested but no luck unfortunately.

There doesn't appear to be any errors related to JS or CSS files either.

Not to worry, I really appreciate your help anyway.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...