• Resolved giovanni.casula

    (@giovannicasula)


    Good Afternoon, Does the Seo Framework plugin works on Advanced Classifieds and Directory Pro plugin? Tile and description are not saved on the listings.

    Many thanks for your help!

    Regards,

    Giovanni Casula

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi Giovanni,

    I just tested the plugin, and everything seems to be in working order.

    Now, this type of issue can arise when there are plugin conflicts on some level–where no database transactions can occur, so saving the SEO metadata fails. These conflicts are often easily spotted in the PHP error logs.

    You might want to contact your hosting provider pinpointing this in the logs. Try saving some SEO metadata on a listing entry, and note down the local time. Forward the issue details and the timestamp to your hosting provider’s support staff, and they might be able to help.

    Alternatively, see if deactivating plugins help. You can deduct the offending plugin by deactivating plugins one by one and try saving some SEO metadata each time you deactivate a plugin–until it works.

    Thread Starter giovanni.casula

    (@giovannicasula)

    Hi Sybre,
    Thank you very much for your reply.
    I’ve just activated your plugin in a new WordPress installation: if there are not custom field there is not any problem. If I add some custom field, I’ve got the same problem. Any suggestion?
    Unfortunately the Advanced Classifieds and Directory Pro team suggested me to install Yoast instead of your plugin.

    Many thanks again for your support.

    Regards,

    Giovanni

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi Giovanni,

    I verified the issue you were facing.

    The data is stored correctly in the database. The front-end shows this data. So, nothing wrong here ??

    However, on the back-end, before The SEO Framework can show its meta box, the meta fields seem to be inaccessible.

    The issue seems to be that Advanced Classifieds and Directory Pro overrides the global post object to the custom field present.

    So, say your custom field has a post ID 4, but the post you’re editing is post ID 9, then you’ll save for 9, but retrieve for 4 on the subsequent request.

    @pluginsware Please advise–and no, not Yoast SEO! D:

    The root cause of this issue is somewhere in the query loop at (or right before) ACADP_PLUGIN_DIR . admin/partials/listings/acadp-admin-custom-fields-display.php, whereafter get_the_ID() returns the value of the last post processed.

    To resolve this issue, the global $post object variable needs to be restored. Restoring the $post value by global reference did the trick for me, but another solution might be preferable. I marked my edits of the code below with // Sybre edit.

    Now, oddly, I couldn’t get wp_reset_postdata() to do what it was supposed to do–perhaps because there’s no initial loop present in the edit screen for it to fall back on. See WP_Query::setup_postdata().

    // Ref: ACADP_Admin_Listings::ajax_callback_custom_fields()--somehow runs at non-ajax...
    
    // Start the Loop
    global $post;
    $cached_post = $post; // Sybre edit: Cache post.
    
    // Process output
    ob_start();
    include( ACADP_PLUGIN_DIR . 'admin/partials/listings/acadp-admin-custom-fields-display.php' );
    $post = $cached_post; // Sybre edit: Restore post.
    // wp_reset_postdata(); // Restore global post data stomped by the_post() // Sybre edit: Now redundant, never worked.
    $output = ob_get_clean();
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The Seo Framework on Advanced Classifieds and Directory Pro’ is closed to new replies.