• I just found an incompatibility between this plugin and wp-user-activity that I believe is a bug in custom-permalinks.

    Steps to reproduce:

    1. create a page or public post and set a custom permalink for it
    2. publish that page/post and verify that you can view it on the frontend
    3. install and activate wp-user-activity
    4. edit the page/post created in step #1 and update the page/post
    5. try to view the page/post on the frontend and you will get a 404 error

    The reason for the 404 is that:

    • whenever activity happens (i.e., creation, update, delete, etc) on a post/page (any many other operations on the backend), wp-user-activity inserts another post with a custom post type (by hooking into save_post) that records the who/what/end of the activity.
    • The custom post type that wp-user-activity inserts is not public
    • the function that custom-permalinks hooks to save_post (custom_permalinks_save_post()) adds it’s custom_permalink post meta’s not only to the page/post that was edited by the user but <b>also</b> to the custom post type that wp-user-activity inserts
    • then, when the original page/post with a custom-permalink is requested on the frontend, custom_permalinks_request() retrieves the post meta that was added to the custom post type inserted by `wp-user-activity and tells WP to redirect to it</li>
      <li>since that custom post type inserted by wp-user-activity isn’t public, WP returns the 404 error.

    I’ve created a patch that fixes this one case. Is there somewhere I can send you that patch?

    • This topic was modified 9 years ago by Paul Biron.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘doesn’t play well with wp-user-activity plugin’ is closed to new replies.