• Resolved biologix

    (@biologix)


    My setting is “Sire Review Default” and schema is Local business. No idea why Stars are not showing up. Any help

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 29 total)
  • Thread Starter biologix

    (@biologix)

    It seems like a conflict with “Autoptimized” plugin. As soon as i turn off Optimize JavaScript Code? option, the stars come back. How to fix it?

    • This reply was modified 5 years, 8 months ago by biologix.
    Plugin Author Gemini Labs

    (@geminilabs)

    Please try the following:

    1. Go to the the Autoptimize Settings page
    2. Click the “Show advanced settings” button
    3. Unselect the “Force JavaScript in <head>?” option

    Plugin Author Gemini Labs

    (@geminilabs)

    Site Reviews requires that it’s inline javascript is inserted on the page before the main javascript file. If you move the main javascript file to the <head> part of the document, it will load before the inline javascript which will break it.

    Alternatively, you can do this: https://pastebin.com/MGwyUSRj However, this will also be added to v3.6.0 of the plugin.

    • This reply was modified 5 years, 8 months ago by Gemini Labs.
    • This reply was modified 5 years, 8 months ago by Gemini Labs.
    • This reply was modified 5 years, 8 months ago by Gemini Labs.
    Thread Starter biologix

    (@biologix)

    Tried what you suggested, also added code in theme’s function.php file, but still no luck.

    This is the options i have checked in Autoptimized.

    Optimize JavaScript Code? checked
    Aggregate JS-files? Checked
    Also aggregate inline JS? Unchecked
    Force JavaScript in <head>? Unchecked
    Exclude scripts from Autoptimize: (tried adding there, but nothing changed)

    Plugin Author Gemini Labs

    (@geminilabs)

    It looks like Site Reviews is not the only thing on your website that is being affected by the Autoptimize settings that you have chosen:

    The solution I provided above fixed the issue in my tests. However, this may be because my WordPress setup is different from yours.

    Please make sure you are clicking the, “Save Changes and Empty Cache” button after making changes to the Autoptimize settings, as the cache may need clearing.

    Since the browser shows that you have other Autoptimize javascript issues that are unrelated to Site Reviews (you can test this by disabling Site Reviews and reloading your page with the web inspector javascript console in view), these could be causing all javascript loaded after the errors to also stop functioning properly.

    I suggest you contact the Autoptimize plugin support for more extensive help as this seems to be an issue with their plugin. They should be able to provide you with more complete advise on how to fix all javascript related issues on your site that are related to the Autoptimize plugin.

    • This reply was modified 5 years, 8 months ago by Gemini Labs.

    Looks like the HTML referenced Autoptimized files that simply weren’t there any more. Could have been a cache issue (page cache vs autoptimize cache), but JS optimization is disabled now.

    There still are errors on the browser console by the way, due to jquery.js being asynced, you’ll have to exclude that from being asynced ??

    Hope this helps,
    frank (ao dev)

    Plugin Author Gemini Labs

    (@geminilabs)

    Thanks @optimizingmatters

    @biologix Since you are hosting with WPEngine, you will need to make sure with any optimizing plugin you use, to also purge the wpengine cache after making changes.

    https://wpengine.com/support/cache/

    • This reply was modified 5 years, 8 months ago by Gemini Labs.
    • This reply was modified 5 years, 8 months ago by Gemini Labs.
    Thread Starter biologix

    (@biologix)

    Now JS Optimization is turned back on and jquery.js is excluded from async. Every time both Autoptimization and WPengine cache is purged when changes are made. Still no stars showing up.

    • This reply was modified 5 years, 8 months ago by biologix.
    Plugin Author Gemini Labs

    (@geminilabs)

    @optimizingmatters @biologix

    This should explain what is going on:

    @biologix maybe tick the “serve as static files”-option to rule out PHP not being allowed to run from wp-content/cache/autoptimize/ ?

    Plugin Author Gemini Labs

    (@geminilabs)

    Thread Starter biologix

    (@biologix)

    Serve as static files is also ticked. Do you see any difference. All caches are emptied.

    “also aggregate inline JS” seems on, can you untick that @biologix ?

    Thread Starter biologix

    (@biologix)

    Now untick. Only this option ticked is Aggregate JS-files?

    Plugin Author Gemini Labs

    (@geminilabs)

    @biologix

    Because some of the Autoptimize settings directly modify the HTML of your page by moving things around, you will just need to play around with the settings until you find what works well for your website.

    Site Reviews uses wp_localize_script to generate an inline script on your page to provide the main javascript file with information that changes depending on your plugin settings (i.e. if you are using the custom translations feature). However, in order for the main javascript file to have access to these variables, the inline script must be loaded first.

    The next minor version of Site Reviews will add some changes that should prevent this problem in the future. It will require making the inline script a little larger, but if it avoids these types of problems then it will be worth the trade-off.

    Sidenote: The Site Reviews javascript file is already minimised and optimised for the smallest file size. Using a plugin like Autoptimize will not make it any smaller in file size. Additionally, HTTP/2 (which most servers and browsers now support) download website assets in parallel, so combining your javascript files into a single file will make no substantial difference in terms of site performance.

    Since there is not much more I can do in terms of support, and as this is not a direct issue with Site Reviews, I will close this topic. If you continue to have problems, please open up a support request on the Autoptimize support forum.

    Thanks

    • This reply was modified 5 years, 8 months ago by Gemini Labs.
    • This reply was modified 5 years, 8 months ago by Gemini Labs.
    • This reply was modified 5 years, 8 months ago by Gemini Labs.
Viewing 15 replies - 1 through 15 (of 29 total)
  • The topic ‘Your overall rating – stars not showing up’ is closed to new replies.