WooCommerce category problem

#106330
  • Resolved Jakub Novák
    Rank Math free

    Undefined index: @type in /wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-frontend.php on line 200

    This is what i see on product category

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.

    Sorry for the issue you are facing.

    Assuming you are using the latest version of all the plugins and the themes (please update if not yet), it would seem like a conflict with one of the plugins or the theme you are using.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Please let us know if you find the culprit.

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    Looking forward to helping you.

    On line 200 you have
    return 'FAQPage' === $schema['@type'];
    but it need to be

    if( isset( $schema['@type'] ) ){
    	return 'FAQPage' === $schema['@type'];
    }

    this is what $schema returns and as you can see the last one has no @type, but @graph array and $type is inside it:

    Array
    (
        [@type] => Organization
        [@id] => https://nu-swift.wp.wcd.ch/#organization
        [name] => Nu-Swift AG
        [url] => https://nu-swift.wp.wcd.ch
    )
    Array
    (
        [@type] => WebSite
        [@id] => https://nu-swift.wp.wcd.ch/#website
        [url] => https://nu-swift.wp.wcd.ch
        [name] => Nu-Swift AG
        [publisher] => Array
            (
                [@id] => https://nu-swift.wp.wcd.ch/#organization
            )
    
        [inLanguage] => de-DE
        [potentialAction] => Array
            (
                [@type] => SearchAction
                [target] => https://nu-swift.wp.wcd.ch/?s={search_term_string}
                [query-input] => required name=search_term_string
            )
    
    )
    Array
    (
        [@type] => CollectionPage
        [@id] => https://nu-swift.wp.wcd.ch/produkt-kategorie/feuerloescher/#webpage
        [url] => https://nu-swift.wp.wcd.ch/produkt-kategorie/feuerloescher/
        [name] => Feuerlöscher
        [isPartOf] => Array
            (
                [@id] => https://nu-swift.wp.wcd.ch/#website
            )
    
        [inLanguage] => de-DE
    )
    Array
    (
        [@context] => https://schema.org/
        [@graph] => Array
            (
                [0] => Array
                    (
                        [@type] => Product
                        [name] => CO2 Master
                        [url] => https://nu-swift.wp.wcd.ch/produkt/co2-master/
                        [@id] => https://nu-swift.wp.wcd.ch/produkt/co2-master/
                        [description] => Der “Allrounder" At lacinia tortor finibus a. Donec pellentesque rhoncus pharetra. Nullam finibus blandit lobortis. Integer viverra non nunc et interdum. Quisque libero tortor, semper in tincidunt nec, feugiat et orci. Sed urna placerat congue. Integer cursus justo mi, in bibendum sem pellentesque ut. Proin tincidunt posuere lacus, in tempus eros scelerisque sed. Donec augue urna, vulputate eu aliquam nec, bibendum gravida eros. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
                    )
    
                [1] => Array
                    (
                        [@type] => Product
                        [name] => CO2 Master v2.0
                        [url] => https://nu-swift.wp.wcd.ch/produkt/co2-master-v2-0/
                        [@id] => https://nu-swift.wp.wcd.ch/produkt/co2-master-v2-0/
                        [description] => Der “Allrounder" At lacinia tortor finibus a. Donec pellentesque rhoncus pharetra. Nullam finibus blandit lobortis. Integer viverra non nunc et interdum. Quisque libero tortor, semper in tincidunt nec, feugiat et orci. Sed urna placerat congue. Integer cursus justo mi, in bibendum sem pellentesque ut. Proin tincidunt posuere lacus, in tempus eros scelerisque sed. Donec augue urna, vulputate eu aliquam nec, bibendum gravida eros. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
                    )
    
            )
    
    )

    Hello,

    Please record a video screencast using a tool like Loom showing the troubleshooting and edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Please do take a complete backup of your website before sharing the information with us.

    We really look forward to helping you.

    oh god… forget it… i wanted to buy PRO license, but if this is how your support looks like, then I will use Yoast again… I literally wrote you what’s the problem and how to solve it… and you want a video? WTF? I’m done here…

    Yes, I agree. I see so many people raised the same issue and no fix, just the same robotic answer. I have this error also, so for now deleted mentioned code of ‘FAQPage’. I hope it will be fixed in next versions.

    Hello,

    We are so sorry for the delay.

    We will be updating the plugin with a fix very soon.

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)

The ticket ‘WooCommerce category problem’ is closed to new replies.