← Back to team overview

launchpad-dev team mailing list archive

Problem with UI migration: NoCanonicalUrl

 

Hi Tim, Curtis,

I've ran into a problem with NoCanonicalUrl exception on Translator when
trying to migrate from translator-edit.pt to generic-edit.pt template.

I don't want to provide an ICanonicalUrlData for Translator because it
doesn't make sense to link to it directly, but I'd be willing to if
nothing else works out.  However, Tim, Curtis mentioned how you are
looking into solving a similar problem.

To trigger the problem, one can patch

=== modified file 'lib/lp/translations/templates/translator-admin.pt'
--- lib/lp/translations/templates/translator-admin.pt	2009-07-17
17:59:07 +0000
+++ lib/lp/translations/templates/translator-admin.pt	2009-08-19
18:46:42 +0000
@@ -3,10 +3,7 @@
   xmlns:tal="http://xml.zope.org/namespaces/tal";
   xmlns:metal="http://xml.zope.org/namespaces/metal";
   xmlns:i18n="http://xml.zope.org/namespaces/i18n";
-  xml:lang="en"
-  lang="en"
-  dir="ltr"
-  metal:use-macro="view/macro:page/onecolumn"
+  metal:use-macro="view/macro:page/main_only"
   i18n:domain="launchpad">
   <body tal:define="context_menu context/menu:context">
     <div metal:fill-slot="main">

and try to get to
https://translations.launchpad.dev/+groups/testing-translation-team/es/+admin

and you get a traceback like
  
  http://paste.ubuntu.com/255875/

Should we work on a solution for this or should we just work around it
by providing adapters for ICanonicalUrlData?

Cheers,
Danilo





Follow ups