[Testbot] Plone 4.3 - Python 2.6 - Build # 2646 - Still failing! - 0 failure(s)

jenkins at plone.org jenkins at plone.org
Sat Jan 24 12:43:45 UTC 2015


-------------------------------------------------------------------------------
Plone 4.3 - Python 2.6 - Build # 2646 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-4.3-python-2.6/2646/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: Products.CMFPlone
Branch: refs/heads/4.3.x
Date: 2013-10-01T10:26:43+02:00
Author: Kai Hoppert () <kai.hoppert at tomcom.de>
Commit: https://github.com/plone/Products.CMFPlone/commit/ae743326a4e3e5ba6935f2b5219207e37b0c854e

If an object is renamed. There is actually no traking if it is a default page.

Files changed:
M Products/CMFPlone/PloneTool.py
M Products/CMFPlone/events.py

diff --git a/Products/CMFPlone/PloneTool.py b/Products/CMFPlone/PloneTool.py
index df8cdb4..89cafa2 100644
--- a/Products/CMFPlone/PloneTool.py
+++ b/Products/CMFPlone/PloneTool.py
@@ -1184,7 +1184,7 @@ def getUserFriendlyTypes(self, typesList=None):
 
     security.declarePublic('reindexOnReorder')
     def reindexOnReorder(self, parent):
-        """ reindexing of "gopip" isn't needed any longer, 
+        """ reindexing of "gopip" isn't needed any longer,
         but some extensions might need the info anyway :("""
         notify(ReorderedEvent(parent))
 
@@ -1323,6 +1323,18 @@ def renameObjectsByPaths(self, paths, new_ids, new_titles,
                     parent = aq_parent(aq_inner(obj))
                     parent.manage_renameObjects((obid,), (new_id,))
                     changed = True
+
+                    #Don't forget default page.
+                    if hasattr(parent, 'getDefaultPage'):
+                        default_page = parent.getDefaultPage()
+
+                        #Plone site has a default_page but return value is None
+                        if not default_page:
+                            default_page = parent.getProperty('default_page', '')
+
+                        if default_page == obid:
+                            parent.setDefaultPage(new_id)
+
                 elif change_title:
                     # the rename will have already triggered a reindex
                     obj.reindexObject()
diff --git a/Products/CMFPlone/events.py b/Products/CMFPlone/events.py
old mode 100755
new mode 100644


Repository: Products.CMFPlone
Branch: refs/heads/4.3.x
Date: 2013-10-08T10:55:41+02:00
Author: Kai Hoppert () <kai.hoppert at tomcom.de>
Commit: https://github.com/plone/Products.CMFPlone/commit/66ebe071686f937adcd2af03a5c38457c15f5d11

Remove not needed code. Plone Site getDefaultPage returned None, because the page was renamed before.

Files changed:
M Products/CMFPlone/PloneTool.py
M docs/CHANGES.rst

diff --git a/Products/CMFPlone/PloneTool.py b/Products/CMFPlone/PloneTool.py
index 89cafa2..d84e987 100644
--- a/Products/CMFPlone/PloneTool.py
+++ b/Products/CMFPlone/PloneTool.py
@@ -1321,20 +1321,16 @@ def renameObjectsByPaths(self, paths, new_ids, new_titles,
                     changed = True
                 if new_id and obid != new_id:
                     parent = aq_parent(aq_inner(obj))
-                    parent.manage_renameObjects((obid,), (new_id,))
-                    changed = True
 
                     #Don't forget default page.
                     if hasattr(parent, 'getDefaultPage'):
                         default_page = parent.getDefaultPage()
-
-                        #Plone site has a default_page but return value is None
-                        if not default_page:
-                            default_page = parent.getProperty('default_page', '')
-
                         if default_page == obid:
                             parent.setDefaultPage(new_id)
 
+                    parent.manage_renameObjects((obid,), (new_id,))
+                    changed = True
+
                 elif change_title:
                     # the rename will have already triggered a reindex
                     obj.reindexObject()
diff --git a/docs/CHANGES.rst b/docs/CHANGES.rst
index ef312df..d38d718 100644
--- a/docs/CHANGES.rst
+++ b/docs/CHANGES.rst
@@ -37,6 +37,9 @@ Changelog
   an empty userid. That way the user gets a helpful message.
   [do3cc]
 
+- If a page is renamed and the page is a default page, default page setting is corrected
+  [hoka]
+
 
 4.3.2 (2013-08-14)
 ------------------


Repository: Products.CMFPlone
Branch: refs/heads/4.3.x
Date: 2015-01-24T13:03:39+01:00
Author: Jens W. Klein (jensens) <jk at kleinundpartner.at>
Commit: https://github.com/plone/Products.CMFPlone/commit/eca5dd20449b5a8988efd7dc0d8fdeafeef302fc

Merge pull request #69 from hoka/4.3.x

If an object is renamed. There is actually no traking if it is a default...

Files changed:
M Products/CMFPlone/PloneTool.py
M Products/CMFPlone/events.py
M docs/CHANGES.rst

diff --git a/Products/CMFPlone/PloneTool.py b/Products/CMFPlone/PloneTool.py
index 498fddd..d8c96a8 100644
--- a/Products/CMFPlone/PloneTool.py
+++ b/Products/CMFPlone/PloneTool.py
@@ -1337,8 +1337,16 @@ def renameObjectsByPaths(self, paths, new_ids, new_titles,
                     changed = True
                 if new_id and obid != new_id:
                     parent = aq_parent(aq_inner(obj))
+
+                    #Don't forget default page.
+                    if hasattr(parent, 'getDefaultPage'):
+                        default_page = parent.getDefaultPage()
+                        if default_page == obid:
+                            parent.setDefaultPage(new_id)
+
                     parent.manage_renameObjects((obid,), (new_id,))
                     changed = True
+
                 elif change_title:
                     # the rename will have already triggered a reindex
                     obj.reindexObject()
diff --git a/Products/CMFPlone/events.py b/Products/CMFPlone/events.py
old mode 100755
new mode 100644
diff --git a/docs/CHANGES.rst b/docs/CHANGES.rst
index 118c2fe..d3ac6dc 100644
--- a/docs/CHANGES.rst
+++ b/docs/CHANGES.rst
@@ -160,6 +160,9 @@ Changelog
   an empty userid. That way the user gets a helpful message.
   [do3cc]
 
+- If a page is renamed and the page is a default page, default page setting is corrected
+  [hoka]
+
 
 4.3.2 (2013-08-14)
 ------------------




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 5875 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20150124/7fc82ab9/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 189454 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20150124/7fc82ab9/attachment-0003.obj>


More information about the Testbot mailing list