Fix for when POSTIDs are GUID's which can cause duplicates in WordPress#1
Open
rorystreet wants to merge 2 commits intoMNF:masterfrom
Open
Fix for when POSTIDs are GUID's which can cause duplicates in WordPress#1rorystreet wants to merge 2 commits intoMNF:masterfrom
rorystreet wants to merge 2 commits intoMNF:masterfrom
Conversation
…blog ML source uses GUIDs for the postid. Wordpress Importer ends up converting these to high value ints which eventually go past the MaxInt value 2147483647 and break word press.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I discovered when migrating from DasBlog that it uses GUID's for the POSTID. When WordPress imports the WRX file it attempts to convert these GUID's to integers. It does this in an unusual way which ends up with integers greater than 2147483647. This is supported in MySQL but in WordPress when rendering a post it converts the POSTID to an integer. PHP when it encounters a number greater than 2147483647 will convert that number to 2147483647. So when WordPress renders a post with an id of say 2147483650 it will end up rendering the post with an id of 2147483647 instead and it then appears your blog is filled with duplicates.
To fix this I have added an optional parameter called /BlogPostIdSeed which allows you to add an identity seed the converter will increment and use instead of the original postid.