Support » Plugin: Schema & Structured Data for WP & AMP » Broken AMP pages when plugin activated

  • When a plugin is activated it displays error on AMP pages despite if AMP options in settings are ticked or not.

    Warning: count(): Parameter must be an array or an object that implements Countable in /home/idarek/ftp/dariusz_wieckiewicz_org/wp-includes/post-template.php on line 293

    I have reset plugin and try to check at what stage it causing a problem and it looks like a problem with pre-set Schema Types. I used Quick Setup for that to exclude my error and this is where this start causing an issue.

    I got Posts set as Blogposting (checked with Article as well) and Pages as WebPage.

    It looks like AMP settings in plugin (ticked or not still causing issue) are not working correctly.

    Any idea how to fix that?

    ps. Whats interesting, I activate this plugin on 7 websites and the problem appear on 2 of them.

    What observed further, even if in plugin an AMP is unticked, schema plugin still pasting below code

    <!-- Schema & Structured Data For WP v1.3.1 - -->
    <script type="application/ld+json">
    []
    </script>

    Further, when modified Schema Type for Posts and select to apply this to posts AND to when Post format is not Equal (Exclude) to Standard, then error disappearing

    • This topic was modified 3 months, 1 week ago by  Dariusz.
    • This topic was modified 3 months, 1 week ago by  Dariusz.
    • This topic was modified 3 months, 1 week ago by  Dariusz.
    • This topic was modified 3 months, 1 week ago by  Dariusz.
    • This topic was modified 3 months, 1 week ago by  Dariusz.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Managed to hide an error through wp-config.php

    define( 'WP_DEBUG', false );
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    However the main issue still exist.

    Plugin Support Sanjeev Kumar

    (@sanjeevsetu)

    We can see the blank script even AMP is uncheck and as well as warnings on some website not on all. It will be fixed in our next update.

    <!– Schema & Structured Data For WP v1.3.1 – –>
    <script type=”application/ld+json”>
    []
    </script>

    Great!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.