Ticket #7777 (closed Bug: fixed)

Opened 4 years ago

Last modified 4 years ago

PATCH Archetypes embeds getPhysicalPath in href of 'If you want to edit the container...' message

Reported by: esrever_otua Owned by: nouri
Priority: major Milestone: 3.1
Component: Archetypes Keywords:
Cc:

Description

Plone 3.0.5, Archetypes 1.5.5

When choosing to edit a folder which has a content item set as the default view, a message is displayed advising the user to 'go here' if they want to actually edit the folder, and not the default view. The href for that link is incorrect; it is generated with getPhysicalPath() instead of, eg, absolute_url()

The offending file is: Products/Archetypes/skins/archetypes/edit_macros.pt on line 44: tal:attributes="href python:'/'.join(here.aq_inner.aq_parent.getPhysicalPath()) + '/edit'">go here</a>.

Example PATCH:

--- Products/Archetypes/skins/archetypes/edit_macros.pt 2008-01-06 13:05:53.000000000 +1300
+++ Products/Archetypes/skins/archetypes/edit_macros.pt.fixed   2008-02-01 10:17:31.000000000 +1300
@@ -41,7 +41,7 @@
        <a href=""
           i18n:name="go_here"
           i18n:translate="label_edit_default_view_container_go_here"
-          tal:attributes="href python:'/'.join(here.aq_inner.aq_parent.getPhysicalPath()) + '/edit'">go here</a>.
+          tal:attributes="href string:${context/aq_inner/aq_parent/absolute_url}/edit">go here</a>.
     </dd>
 </dl>
 

Change History

comment:1 Changed 4 years ago by nouri

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r9386 in the AT repository.

Note: See TracTickets for help on using tickets.