• Resolved blatka

    (@blatka)


    Hi There. I’ve been using Slim SEO for several months without issue. I just added a JetEngine custom post type and get critical errors when trying to view the post. It’s a direct conflict with Slim SEO (errors go away when Slim SEO is deactivated). Here’s the error log which calls out a problem with line 145 of your plugin file:

    When seeking help with this issue, you may be asked for some of the
    following information:
    WordPress version 6.7.2
    Active theme: Bricks Child Theme (version 1.1)
    Current plugin: Slim SEO (version 4.3.0)
    PHP version 8.3.16

    Error Details
    =============
    An error of type E_ERROR was caused in line 145 of the file
    /home/reinforcements/public_html/wp-content/plugins/slim-seo/src/MetaTags/Data.php.
    Error message: Uncaught TypeError: reset(): Argument #1 ($array) must
    be of type array, string given in
    /home/reinforcements/public_html/wp-content/plugins/slim-seo/src/MetaTags/Data.php:145
    Stack trace:
    #0 /home/reinforcements/public_html/wp-content/plugins/slim-seo/src/MetaTags/Data.php(145):
    reset()
    #1 /home/reinforcements/public_html/wp-content/plugins/slim-seo/src/MetaTags/Data.php(61):
    SlimSEO\MetaTags\Data->get_custom_field_data()
    #2 /home/reinforcements/public_html/wp-content/plugins/slim-seo/src/MetaTags/Data.php(24):
    SlimSEO\MetaTags\Data->get_post_data()
    #3 /home/reinforcements/public_html/wp-content/plugins/slim-seo/src/MetaTags/Helper.php(145):
    SlimSEO\MetaTags\Data->collect()
    #4 /home/reinforcements/public_html/wp-content/plugins/slim-seo/src/MetaTags/Helper.php(127):
    SlimSEO\MetaTags\Helper::render_dynamic_variables()
    #5 /home/reinforcements/public_html/wp-content/plugins/slim-seo/src/MetaTags/Title.php(80):
    SlimSEO\MetaTags\Helper::render()
    #6 /home/reinforcements/public_html/wp-content/plugins/slim-seo/src/MetaTags/AdminColumns/Post.php(27):
    SlimSEO\MetaTags\Title->get_rendered_singular_value()
    #7 /home/reinforcements/public_html/wp-includes/class-wp-hook.php(324):
    SlimSEO\MetaTags\AdminColumns\Post->render()
    #8 /home/reinforcements/public_html/wp-includes/class-wp-hook.php(348):
    WP_Hook->apply_filters()
    #9 /home/reinforcements/public_html/wp-includes/plugin.php(517):
    WP_Hook->do_action()
    #10 /home/reinforcements/public_html/wp-admin/includes/class-wp-posts-list-table.php(1403):
    do_action()
    #11 /home/reinforcements/public_html/wp-admin/includes/class-wp-list-table.php(1802):
    WP_Posts_List_Table->column_default()
    #12 /home/reinforcements/public_html/wp-admin/includes/class-wp-posts-list-table.php(1437):
    WP_List_Table->single_row_columns()
    #13 /home/reinforcements/public_html/wp-admin/includes/class-wp-posts-list-table.php(839):
    WP_Posts_List_Table->single_row()
    #14 /home/reinforcements/public_html/wp-admin/includes/class-wp-posts-list-table.php(815):
    WP_Posts_List_Table->_display_rows()
    #15 /home/reinforcements/public_html/wp-admin/includes/class-wp-list-table.php(1712):
    WP_Posts_List_Table->display_rows()
    #16 /home/reinforcements/public_html/wp-admin/includes/class-wp-list-table.php(1639):
    WP_List_Table->display_rows_or_placeholder()
    #17 /home/reinforcements/public_html/wp-admin/edit.php(503):
    WP_List_Table->display()
    #18 {main}
    ?thrown

    This JetEngine CPT is using its own custom database table.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Anh Tran

    (@rilwis)

    Hi @blatka ,

    Can you please share how do you set up the meta tags for the archive page?

    Thread Starter blatka

    (@blatka)

    Hi @rilwis

    I initially set up a taxonomy via JetEngine for the custom post type. I’ve since deleted the taxonomy as I didn’t need it, but still get fatal errors when trying to view any post of that post type. I’m not using archive pages.

    Plugin Author Anh Tran

    (@rilwis)

    Hi @blatka ,

    I tried to create post types with JetEngine and viewing it. I don’t see any errors. Furthermore, I set up a test site here, can you please try it and replicate the bug? Here is the temporary login with admin access.

    Thread Starter blatka

    (@blatka)

    Hi @rilwis . I logged into the site and created the same CPT I have in my site. Without access to the file system in InstaWP I can’t create the custom post template, but right away, we can see it’s causing the same critical error I have on my site when looking at one of the custom posts in the admin. Go here: https://altruistic-squirrel-e9df9e.instawp.xyz/wp-admin/edit.php?post_type=state-thresholds

    • This reply was modified 3 weeks ago by blatka.
    Plugin Author Anh Tran

    (@rilwis)

    Hi @blatka,

    Thanks for your help. I found the problem. It’s the custom DB storage for custom fields in JetEngine. JetEngine tries to merge its data to WordPress’s get_post_meta function, but when its data is an array, it doesn’t do auto unserialization as WordPress does. The result is that the data is still a string, which it should be an array. And that causes the error.

    I’ve fixed this here by adding a check to ensure the data is valid. This fix will be available in the next version of Slim SEO.

    Thread Starter blatka

    (@blatka)

    Thank you, @rilwis ! I look forward to turning SlimSEO back on with this release.

    Thanks for tracking that down. Great service and plugin!

    Bill

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