V2 gd_place autosave

This topic contains 4 replies, has 3 voices, and was last updated by  Tsekka 4 years, 12 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #484924

    Tsekka
    Buyer
    Post count: 42

    Hi, how does the gd_place add-listing autosave work?

    Is it considered normal that if author refreshes the page on front-end add-listing page or presses back-button and later returns, then he instantly gets “Hey, we found some unsaved changes…” notification without having actually touched any of form fields last time?

    Is it possible to turn this function off?

    Thanks.

    #485006

    Alex Rollin
    Moderator
    Post count: 27815

    That is normal…it is actually a WP function.
    I will flag your topic for the developers in case there is a workaround.

    #485086

    Tsekka
    Buyer
    Post count: 42

    Ok thanks,

    It could look trivial that user gets “Hey, we found some unsaved changes…” notification if nothing have changed in custom fields but it is problematic if you use gd-add-listing shortcode but at the same time need to use rest api to modify custom fields.

    I tested and this is what happened:

    1) Visited add-listing page and left the page
    2) Modified custom field with rest api
    3) Returned to add-listing page and saw auto-save notification and did not see the changes i had made with rest api. Even after clicking “remove changes” link i did not see the changes right away but had to Ctrl + F5.

    Maybe rest api handler should clear the autosaves from db or something…

    #485291

    Kiran
    Moderator
    Post count: 7069

    Hello,

    In add listing page when form finds field updated it makes request to save data via AJAX. It follows WordPress revision system.

    When page refreshed or left before submit, it shows saved revision post when going to add listing again. If there is post revision saved then it will show message about revision(remove changes…).

    For more details about revisions/autosaves see https://wordpress.org/support/article/revisions/

    For Rest API with post revisions see https://developer.wordpress.org/rest-api/reference/post-revisions/

    Kiran

    #485543

    Tsekka
    Buyer
    Post count: 42

    Oh, thanks for links

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket