Hi @tenc,
sorry for all the inconvenience. I guess that the problem is due to the fact I enabled URI editor box for auto-drafts & drafts.
I am not certain, if you cannot access preview URL or if the preview URL is not displayed in “Edit Post/Page/…” admin page?
If you cannot access preview page (it returns 404 error), could you append ?&debug_url=1 to your preview URL and post the output here?
Best Regards,
Maciej
Thread Starter
Tenc
(@tenc)
This is the output:
{“old_query_vars”:{“preview”:”true?”,”error”:”404″},”new_query_vars”:{“name”:””,”post_type”:”prodotto”,”prodotto”:””,”do_not_redirect”:1}}
in other cases you will be redirected to the homepage.
Does the preview URL is the same when my plugin is disabled & enabled?
Could you post sample preview URLs?
Thread Starter
Tenc
(@tenc)
No, the url is different.
plugin enabled –> /prodotto/olive-allascolano/?preview=true
plugin disabled –> /?post_type=prodotto&p=5768%2F&preview=true
@tenc
please replace the contents of this file:
wp-content/plugins/permalink-manager/includes/core/permalink-manager-uri-functions-post.php
with this code:
https://gist.github.com/maciejbis/f2ac70847889aa3ce3a3fcb92b5db82f
I added additional condition to exclude preview URLs from permalink filters in custom_post_permalinks() function. Let me know if it helps.
Thread Starter
Tenc
(@tenc)
I tried but the result is always the same.
the url is –> /prodotto/olive-allascolano/?preview=true
Hi @tenc
I am not able to reproduce the issue, would you be able to prepare a copy of your WordPress environment and provide me with temp. FTP access to wp-content/permalink-manager directory on server.
If yes, please contact me via contact [at] maciejbis.net
Thread Starter
Tenc
(@tenc)
Hi Maciej, i have another problem with the plugin… i send you an email about.
Giacomo