Why Posting Permalink with Preview Link?
-
I’ve noticed since I am using this plugin, every time when I publish a post, it displays the final link as a preview link. How is this relevant (Including in RSS feeds permalinks). My post permalink setup is just a domain/post format.
This did not happen before I used this plugin.-
This topic was modified 6 years, 3 months ago by
Ruhani Rabin.
-
This topic was modified 6 years, 3 months ago by
-
Hi @ruhanirabin. Sorry, I’m not quite understanding this feedback.
Could you post here or contact us https://publishpress.com/contact/ with a screenshot showing the problem?
Dear @publishpress
When I prepare to publish a post on a scheduled date, and click the schedule button, it is supposed to show me the URL in the final URL format. such as domain.com/?p=1233 or xxx.com/%post-name% format. It shows me the Final post URL as
https://www.domain.com/?p=18546&preview=true&preview_id=18546-< this is supposed to behttps://www.domain.com/?p=18546This goes the same for the RSS feed:
The posts that are already published should have a full URL as GUID. But, it carries a different (preview URL) than the final post URL likehttps://www.domain.com/?p=18546You can try these images for reference: https://imgur.com/a/NR0EQGU
This only happened after I started using PublishPress. Any help would be appreciated. Thanks
Hi @ruhanirabin
Thanks for reporting the issue. Please, could you try the following beta package?
https://www.dropbox.com/s/q10et1umdpjar28/publishpress-2.0.3-alpha.1.zip?dl=0
Please, let us know if that fixes the issue.
Thanks,
Anderson
Hi @andergmartins, I have removed the previous plugin 2.0.2 and installed 2.0.3 alpha and it seems it has resolved the problem. I will monitor more (RSS feed entries) and let you know. Thanks a lot.
That’s great to hear, thanks @ruhanirabin
We’ll officially release that version ASAP.
If you can, please consider leaving a positive review: https://ww.wp.xz.cn/support/plugin/publishpress/reviews/#new-post. It helps us to keep improving the plugin.
@publishpress the RSS FEED still inlcudes the wrong permlink URL (domain.com/feed/)
<guid isPermaLink="false"> domain.com/?p=18454&preview=true&preview_id=18454 </guid>this is supposed to be:
<guid isPermaLink="false"> domain.com/?p=18454 </guid>You can inspect a live feed URL here – GUID section
-
This reply was modified 6 years, 3 months ago by
Ruhani Rabin. Reason: spelling
Hi @ruhanirabin,
As I can see that value is coming from the field “GUID” in the table *_posts. It is not added by the plugin anymore but since those fields were saved before the fix the value includes the “preview” params.
We will probably need to run a query to fix those values.
Do you have access to the DB? Before trying this make sure you have a full backup of your site.You can try running the following query:
UPDATE wp_posts SET guid = REPLACE(guid, CONCAT('&preview=true&preview_id=', ID), '') WHERE post_status IN ('publish', 'future').
Please, could you let us know if that fixes the issue for you?
Hi, @andergmartins sorry for the late reply but the above query does not work due to extra strings in the saved DB value:
https://www.domain.com/?p=18703&preview=true&preview_id=18703wp is stripping #038 from this url..see the pic here https://imgur.com/cLpvnIladding
#038to the query returns an error-
This reply was modified 6 years, 2 months ago by
Ruhani Rabin.
-
This reply was modified 6 years, 2 months ago by
Ruhani Rabin. Reason: more details
-
This reply was modified 6 years, 2 months ago by
Ruhani Rabin.
-
This reply was modified 6 years, 2 months ago by
Ruhani Rabin. Reason: update url
-
This reply was modified 6 years, 2 months ago by
Ruhani Rabin.
-
This reply was modified 6 years, 2 months ago by
Ruhani Rabin.
Hi @ruhanirabin,
Alright, thank you for trying it.
Please, could you try this query?UPDATE wp_posts SET guid = REPLACE(guid, CONCAT('#038;preview=true#038;preview_id=', ID), ''), guid = REPLACE(guid, CONCAT('?preview=true?preview_id=', ID), '') WHERE post_status IN ('publish', 'future');It worked for me. If it still returns an error, please, could you send it so we can have more information?
Thanks
Not sure why it is returning errors on my MariaDB
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''#038)' at line 1Server info:
Server type: MariaDB Server version: 10.3.12-MariaDB-log - MariaDB Server Protocol version: 10-
This reply was modified 6 years, 2 months ago by
Ruhani Rabin. Reason: Server info
Hi @ruhanirabin,
Thanks for trying again and for the information.
That is weird. I will keep trying to find a workaround or implement something on the plugin.We will keep you posted.
-
This reply was modified 6 years, 3 months ago by
The topic ‘Why Posting Permalink with Preview Link?’ is closed to new replies.