• Resolved thebigbanik

    (@thebigbanik)


    Hi, I am trying your plugin (lite version) to autogenerate the permastructures of posts under CPTs. I have already set how exactly I need the structure after the post title (-%hour%%post_id%) and I am dealing with this. Created 4 posts almost immediately (1-2 seconds time difference) and the custom permalinks applied to half of them in the order: 1st post (worked), 2nd post (not worked), 3rd post (worked), 4th post (not worked). it looks like the process skips one post each time. Is this a known behavior? Should this work like that? Is there a setting that I have to take under consideration? Thanks.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi @thebigbanik,

    I apologize for the inconvenience. To be honest, I have never tested the plugin in such scenario, but I guess that the problem here is that all the custom permalinks are stored serialized in $permalink_manager_uris global. I am not exactly certain how exactly you add the new posts, but apparently the update_option() function that saves custom permalink behaves like it is called asynchronously.

    Theoretically, if you create a first post, Permalink Manager will append the new permalink to the end of custom permalinks array inside the global variable and finally save the whole $permalink_manager_uris in the database. The problem may appear, if you publish another post before the $permalink_manager_uris global with the custom permalink for first post is saved to the database. Then, the array with custom permalink for earlier post can be overwritten with the array including the newer post’s but without the custom permalink for earlier post.

    • This reply was modified 1 month, 4 weeks ago by Maciej Bis.
    Thread Starter thebigbanik

    (@thebigbanik)

    Hi, thank you for the reply. I use Jet Forms to create the posts form the front end. I was testing this scenario in case multiple users create a new post at the same time. Jet forms use the Insert Post instead of Update post, so maybe this is the reason or maybe as you said this small time difference until data is saved in database, I any case, I have to keep that in my mind and check the new post’s url often and regenerate manually.

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