Support » Plugin: WPAdverts - Classifieds Plugin » 404 on saving edited ad

  • Resolved lausianne

    (@lausianne)


    When I edit an ad in the frontend and click “Update” I get a 404 and the edit is not saved. The URL remains the same as the edit page, though, so I don’t know where Save is supposed to lead.

    Expired handling is set to status 200.

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

    (@gwin)

    I understand you are editing from a page with [adverts_manage] shortcode?

    If so then after clicking an Update link you should not be redirected to any page, you should stay on the same page.

    Most likely the 404 is caused by some field in the edit form (which conflicts with one of the variables reserved for WP router), do you have some custom fields added to the form? If you do then what are the field names?

    lausianne

    (@lausianne)

    No custom fields. I have no add-ons installed on that test site.
    Here’s a link: https://entwicklung.site/wpadverts/
    … protected by user/pw. Can I send that privately?

    lausianne

    (@lausianne)

    Just now I tried again, and this time no more 404. I found that it works on my separate Manage page that contains nothing but the shortcode [adverts_manage]
    But on the home page that contains several codes and also [adverts_manage], I get the 404.

    For the separate page, the link would be https://mysite.com/wpadverts/?page_id=9&advert_id=39
    For the home page: https://mysite.com/wpadverts/?advert_id=39

    So I tried this URL manually: https://mysite.com/wpadverts/?page_id=2&advert_id=39
    where ID 2 is my home page. This works fine.

    Next experiment: I declared the Manage page as home page. Voila, it fails, and the previous home page works.

    Conclusion: [adverts_manage] does not work on the home page

    EDIT: Confirmed on your demo site.

    • This reply was modified 3 months ago by  lausianne.
    • This reply was modified 3 months ago by  lausianne.
    Plugin Author Greg Winiarski

    (@gwin)

    By homepage do you mean an URL like https://example.com/ or https://example.com/adverts/ (a page with [adverts_list])? as it is not really clear from your description?

    lausianne

    (@lausianne)

    Homepage: /
    (/adverts/) I’d consider the “adverts” page.

    Plugin Author Greg Winiarski

    (@gwin)

    Ohh ok, i will look into it, but the [adverts_manage] shortcode was not really meant to be used on the homepage (as usually, the homepage does some redirects to keep the canonical link clear).

    I see. I just put it there for testing, it does not need to stay. No urgent fix needed for me.
    Good to know about those redirects …

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