Support » Plugin: WPAdverts - Classifieds Plugin » Ads get doubled and Temporary state?

  • Resolved destabilizator

    (@destabilizator)


    Anytime user posts ad (moderate=1), it creates 2 posts and they get Temporary status, e-mail core::on_draft_to_pending_notify_admin is not sent (I suppose since the post has status Temporary and not Pending) and it cannot be easily published :-/
    It used to work, what happened? Why the posts get Temporary status?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    the posts get a Temporary status when in [adverts_add] shortcode you either add an image to the gallery or go from the form to the preview.

    The temporary post should be automatically removed when you abandon the page with [adverts_add] shortcode.

    On the other hand if you will go from Preview to Publish then the temporary status should change to pending.

    The message core::on_draft_to_pending_notify_admin is assigned to advert_tmp_to_pending post status transition so it should fire when you go to the last step in [adverts_add].

    Thread Starter destabilizator

    (@destabilizator)

    “On the other hand if you will go from Preview to Publish then the temporary status should change to pending.” I believe this is not happening, user clicks “publish” (and that should set it for moderation), but it just sits in temporary

    Plugin Author Greg Winiarski

    (@gwin)

    Can you share the URL of the page where you are having this problem so i can take a look at your setup on-site?

    That is do you use the WooCommerce Integration or the default Payments Module or maybe you are not using any of these?

    Thread Starter destabilizator

    (@destabilizator)

    https://www.cips.cvut.cz/projekty/doucovani/pridat-inzerat/ (it’s all in Czech language, maybe Google translate the page?)
    I don’t have anything but Core and E-mail modules activated, all ads are free
    Thanks 🙂

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    ok thanks for the information, with just plain WPAdverts i think i know where is the problem coming from.

    It seems you are using child templates specifically for add-preview.php template file. In version 1.4 we added nonces to better secure the form but this update required our users to update the add-preivew.php child template file.

    In your case there seems to be an old version of add-preview.php since i cannot see the _post_id_nonce field in the source code.

    To fix the problem you would need to update your add-preview.php file, most likely it is somewhere in your current (child) theme directory or maybe you have a custom plugin installed that overwrites the files.

    Once you find it you can either delete the custom add-preview.php file (so the original file will be used) you have or replace it with the add-preview.php from the original WPAdverts source code.

    Thread Starter destabilizator

    (@destabilizator)

    Hi Greg, I’ve updated the template add-preview.php and that seemed to fix the issue.
    But it seems the ad get Temporary status as well, is there any other template that I possibly need to update?

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    you should not need to change any other files at least as far as the temporary state is concerned.

    I am not exactly sure about your question, you wrote that the update fixed the issue but it still happens?

    The ads should actually get a Tmp status but only for a while, that is the status is granted when user adds an image or goes to the preview.

    The Tmp status should be either:
    – changed to pending or publish when the user will go from preview to publish
    – the Ad with Tmp status should be deleted if the user abandons the page with [adverts_add] shortcode

    In other words if you do get Ads with Tmp status but the Ads disappear then the plugin seems to be working as expected.

    Thread Starter destabilizator

    (@destabilizator)

    Fixed – as in the ad moves to Pending status for moderation, doesn’t just sit in Temporary as before.
    Thanks for help! 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Ads get doubled and Temporary state?’ is closed to new replies.