core icon indicating copy to clipboard operation
core copied to clipboard

Pushing modified container not reflecting changes in pages using it

Open dsilvam opened this issue 12 years ago • 11 comments

Steps to reproduce:

  1. Create container (save & publish)
  2. Create page using container (save & publish)
  3. Add some live content to page
  4. Push publish page (should be able to see page at receiver after this)
  5. Modify container code at local
  6. Push publish container (EDITED: Push only the container, not the page)

Error: page at remote still shows old version of the container.

This works after flushing cache at receiver

dsilvam avatar Oct 14 '14 20:10 dsilvam

@jcastro-dotcms this should be handled by the containerAPI in a commit listener

jtesser avatar Oct 15 '14 11:10 jtesser

fix for this issue here: https://github.com/dotCMS/support/blob/master/hotfixes/hotfix-GIT-6587-v2.5.6/enterprise/src/com/dotcms/enterprise/publishing/remote/handler/ContainerHandler.java. you can diff to see the changes

dsilvam avatar Oct 15 '14 16:10 dsilvam

@dsilvam @maurizo @jcastro-dotcms So I am not sur this is the right fix.

I think these issues are reproducible locally and have to do with the page cache. In the container case you can reproduce it without push pub. So in this case it works for push pub and not locally

jtesser avatar Oct 15 '14 16:10 jtesser

It didn't happen to me locally, actually I just tested in 2.5.6 to make sure. If you change something in the container and save & publish***, pages using it reflect changes locally. Problem was only when pushing

dsilvam avatar Oct 15 '14 17:10 dsilvam

After testing, with the latest changes, we're getting a SQL exception in the receiver. Push publishing the HTML works the first time, and it fails after we edit the container and push publish again. This is part of the error:

com.dotcms.publishing.DotPublishingException: Unable to save/update Object to Hibernate Session

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (dotcms30publish.container_version_info, CONSTRAINT fk_container_version_info_working FOREIGN KEY (working_inode) REFERENCES containers (inode))

jcastro-dotcms avatar Oct 15 '14 17:10 jcastro-dotcms

Let me clarify something that I think is not clear: Step 6 consists of pushing the container only, not the page

dsilvam avatar Oct 15 '14 18:10 dsilvam

Steps updated.

dsilvam avatar Oct 15 '14 18:10 dsilvam

Thanks Daniel! I followed the updated steps (push publishing the Container and not the HTML page) and I'm still seeing the SQL exception in the logs:

com.dotcms.publishing.DotPublishingException: Unable to save/update Object to Hibernate Session

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (dotcms30publish.container_version_info, CONSTRAINT fk_container_version_info_working FOREIGN KEY (working_inode) REFERENCES containers (inode))

Looking in to it.

jcastro-dotcms avatar Oct 15 '14 18:10 jcastro-dotcms

Pull request: https://github.com/dotCMS/core/pull/6607

jcastro-dotcms avatar Oct 20 '14 22:10 jcastro-dotcms

System is not pushing the container by dependency when the html page is push published. Unable to reproduce step 5 and 6 and verify fix Test info: 12/13 nightly build Log on receiver node: https://gist.github.com/shayngr/c3198e2aa37cc4f2a755 Sender: Linux // H2 // Chrome Receiver: MacOSX // H2 // FF

hibernate session

shaydotcms avatar Dec 19 '14 06:12 shaydotcms

@shayngr i am not sure this is happening. But if the container is not pushing when you push a page you need to create an issue for it

jtesser avatar Dec 19 '14 12:12 jtesser