Integrity Checker problems with multi language pages
We are having problems with the multi language pages.... If you create pages with the same name but with a different language in the same folder on both servers, the integrity checker is not detecting conflicts, but if you try to push the page, you will have problems...
To recreate:
- Configure the push environment
- Create a new folder with the same name in both sides
- Create a new page with the same name in both sides, but with a different language (sender in English) (receiver in Spanish)
- Run the integrity checker to make sure you don't have conflicts
- Try to push the created page
You will have the follow error and the bundle fails
[29/05/15 09:59:16:028 CST] ERROR business.PublisherAPIImpl: Error Publishing Bundle: Conflict between HTML pages. Page with identifier : 'f796fff7-8714-41bd-ab8d-d8f94930e32e' has different Inodes at sender and receiver. Please run the Integrity Checker at sender.
com.dotcms.publishing.DotPublishingException: Conflict between HTML pages. Page with identifier : 'f796fff7-8714-41bd-ab8d-d8f94930e32e' has different Inodes at sender and receiver. Please run the Integrity Checker at sender.
at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:264)
at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handle(SourceFile:85)
at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handle(SourceFile:75)
at com.dotcms.publisher.receiver.BundlePublisher.process(BundlePublisher.java:162)
at com.dotcms.rest.PublishThread.run(PublishThread.java:41)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.dotmarketing.exception.DotDataException: Conflict between HTML pages. Page with identifier : 'f796fff7-8714-41bd-ab8d-d8f94930e32e' has different Inodes at sender and receiver. Please run the Integrity Checker at sender.
at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:341)
at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:126)
... 5 more
[29/05/15 09:59:16:043 CST] ERROR lang.String: Error Publishing: com.dotcms.publishing.DotPublishingException: Conflict between HTML pages. Page with identifier : 'f796fff7-8714-41bd-ab8d-d8f94930e32e' has different Inodes at sender and receiver. Please run the Integrity Checker at sender.
Tested in the last nightly build // Postgres // FF on both sides
Test case created http://qa.dotcms.com/index.php?/cases/view/61330
The mechanism currently used by the Integrity Checker cannot detect this kind of conflict because of the way they are solved in the destination endpoint (local or remote fix).
Multilingual pages changed the way the Integrity Checker works, so that a page conflict is detected when pages with different Identifier, but same URL and language ID are present in 2 servers. So in this case, the page has a different language ID in both server, so the conflict is not detected because, in theory, they are not the same page. Now, this distinction of language IDs is necessary to avoid detecting false conflicts, for example, in the following case:
| Page in Sender | Page in Receiver |
|---|---|
| /test-page (English) | /test-page (English) |
| /test-page (French) |
In order to solve the conflict here, we need to update the Identifier, Working Inode, and Live Inode of the "/test-page" in English (the original conflict). The language ID distinction allows the Integrity Checker to SAFELY IGNORE the French page during the process; otherwise, we'd be setting the same Working Inode and Live Inode for it and the system would crash because you cannot have duplicate Inodes for two different pages. The Integrity Checker is currently able to fix the data for the English page BUT just fix the Identifier for the French page, and any other language that exists in the receiver server.
For the example that Bryan describes, we cannot fix the page anywhere because we'd break this functionality. Taking into consideration that the scenario described by Bryan would be "breaking the rules" (i.e., modifying data directly in production) the user will have to fix the problem manually. Here are the steps users will have to follow:
- In the receiver, check the language of the page (in this case, Spanish).
- In the sender, create a Spanish version of the page (you don't need to add content to it) and run the Integrity Checker.
- This time, dotCMS will be able to detect the conflict so you can fix it. Select "Fix on remote" in order to keep the Identifier of you local.
- Now, push the English version of the page to the receiver. This time it will not fail because the Identifiers are the same.
- If it's not necessary anymore, you can Push Delete the Spanish version of the page and just keep the English version. Now, the conflict is gone and you have the correct page with the same data in both sender and receiver.
I'll leave this ticket open until we get the final decision. In the end, adding/modifying content in production is something that authors should never do.
I can not understand the case of why we need the integrity checker to pass the language id. We need any page that answers to a url to have the same identifier, regardless of the language id.
This issue has been automatically marked as stale because it has not had activity within the past 90 days. It will be closed in 30 days no further activity occurs. Thank you.