|
|
Hi,
I try to create an add-on for the LibreOffice community template site, that makes it easy for contributors to upload a template to the site (the Plone Software Center hierarchy is to complicated for that). Thus I created a new add-on with paster and added three content types to it: the TemplateUploadCenter, the templateproject and the downloadablefile. They should later be in a hierarchy (the later ones should only be created inside the first one). I tried then to add a view to the add-on for the TemplateUploadCenter, but I can't get it to work. I get only the base_view. I created a page-template for the templatecenter but I get an error now with the TAL-expression: <div metal:fill-slot="main" tal:define="view context/@@templateuploadcenter_view"> The traceback is here: http://pastie.org/3139263 It's the view-part of the expression that causes the error-message. My current code is here: https://github.com/andreasma/collective.TemplateUploadCenter The page-template is this: https://github.com/andreasma/collective.TemplateUploadCenter/blob/master/collective/TemplateUploadCenter/skins/templateuploadcenter/templateuploadcenter_view.pt Thanks for any hint Regards, Andreas -- ## Developer LibreOffice ## Freie Office-Suite für Linux, Mac, Windows ## http://LibreOffice.org ## Support the Document Foundation (http://documentfoundation.org) ## Meine Seite: http://www.amantke.de ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Plone-Users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-users |
|
|
Hi Benjamin,
I don't get what you explained. Am Freitag, 6. Januar 2012, 22:44:48 schrieb Benjamin Hedrich: > Hi Andreas, > > 1. your template (in skins/) is called "templateuploadcenter_view.pt" > (https://github.com/andreasma/collective.TemplateUploadCenter/blob/master/c > ollective/TemplateUploadCenter/browser/configure.zcml) > The name of the template is name="templateuploadcenter_view" #[line 11] and the path to the template is in line 13: template="../skins/templateuploadcenter/templateuploadcenter_view.pt" > 2. your browser view is registered as "templateuploadcenter_view" > yes. > -> you get this recursion exception, i think I looked at the Plone Software Center browser-view and template-setting and can't find the point where I not followed the way it was done there. Maybe I missed something, but I don't catched it yet. Regards, Andreas -- ## Developer LibreOffice ## Freie Office-Suite für Linux, Mac, Windows ## http://LibreOffice.org ## Support the Document Foundation (http://documentfoundation.org) ## Meine Seite: http://www.amantke.de ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Plone-Users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-users |
|
Dieter Maurer |
|
|
In reply to this post by andreasma
Andreas Mantke wrote at 2012-1-6 22:09 +0100:
> ... >I tried then to add a view to the add-on for the TemplateUploadCenter, but I can't >get it to work. I get only the base_view. I created a page-template for the >templatecenter but I get an error now with the TAL-expression: > <div metal:fill-slot="main" > tal:define="view context/@@templateuploadcenter_view"> > >The traceback is here: http://pastie.org/3139263 Path expressions (like "context/@@templateuploadcenter_view") try to call the resulting object. If this is really a view, you might not want it to be automatically called here. Then, you could use tal:define="view nocall:context/@@templateuploadcenter_view"> instead. -- Dieter ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Plone-Users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-users |
|
|
Hi Dieter,
Am Montag, 9. Januar 2012, 10:14:45 schrieb Dieter Maurer: > Andreas Mantke wrote at 2012-1-6 22:09 +0100: > > ... > > > >I tried then to add a view to the add-on for the TemplateUploadCenter, but > >I can't get it to work. I get only the base_view. I created a > >page-template for the > > > >templatecenter but I get an error now with the TAL-expression: > > <div metal:fill-slot="main" > > > > tal:define="view context/@@templateuploadcenter_view"> > > > >The traceback is here: http://pastie.org/3139263 > > Path expressions (like "context/@@templateuploadcenter_view") try > to call the resulting object. If this is really a view, you might > not want it to be automatically called here. Then, you could > use > > tal:define="view nocall:context/@@templateuploadcenter_view"> > > instead. thanks for your hint, but it doesn't solve the issue. I get nearly the same error message. Regards, Andreas -- ## Developer LibreOffice ## Freie Office-Suite für Linux, Mac, Windows ## http://LibreOffice.org ## Support the Document Foundation (http://documentfoundation.org) ## Meine Seite: http://www.amantke.de ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Plone-Users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-users |
|
Dieter Maurer |
|
|
Andreas Mantke wrote at 2012-1-9 20:45 +0100:
>Am Montag, 9. Januar 2012, 10:14:45 schrieb Dieter Maurer: >> Andreas Mantke wrote at 2012-1-6 22:09 +0100: >> > ... >> > >> >I tried then to add a view to the add-on for the TemplateUploadCenter, but >> >I can't get it to work. I get only the base_view. I created a >> >page-template for the >> > >> >templatecenter but I get an error now with the TAL-expression: >> > <div metal:fill-slot="main" >> > >> > tal:define="view context/@@templateuploadcenter_view"> >> > >> >The traceback is here: http://pastie.org/3139263 >> >> Path expressions (like "context/@@templateuploadcenter_view") try >> to call the resulting object. If this is really a view, you might >> not want it to be automatically called here. Then, you could >> use >> >> tal:define="view nocall:context/@@templateuploadcenter_view"> >> >> instead. > >thanks for your hint, but it doesn't solve the issue. I get nearly the same error >message. >From the same location inside your template (containing the "view" definition above)? That would be surprising. Maybe, you have somewhere else in your template another (possibly inadvertant) call of the view? -- Dieter ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Plone-Users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-users |
|
|
Hi Dieter,
Am Dienstag, 10. Januar 2012, 07:34:36 schrieb Dieter Maurer: > Andreas Mantke wrote at 2012-1-9 20:45 +0100: > >Am Montag, 9. Januar 2012, 10:14:45 schrieb Dieter Maurer: > >> Andreas Mantke wrote at 2012-1-6 22:09 +0100: > >> > ... > >> > > >> >I tried then to add a view to the add-on for the TemplateUploadCenter, > >> >but I can't get it to work. I get only the base_view. I created a > >> >page-template for the > >> > > >> >templatecenter but I get an error now with the TAL-expression: > >> > <div metal:fill-slot="main" > >> > > >> > tal:define="view context/@@templateuploadcenter_view"> > >> > > >> >The traceback is here: http://pastie.org/3139263 > >> > >> Path expressions (like "context/@@templateuploadcenter_view") try > >> to call the resulting object. If this is really a view, you might > >> not want it to be automatically called here. Then, you could > >> use > >> > >> tal:define="view nocall:context/@@templateuploadcenter_view"> > >> > >> instead. > > > >thanks for your hint, but it doesn't solve the issue. I get nearly the > >same error message. > > From the same location inside your template (containing the "view" > definition above)? > That would be surprising. > yes, it's at the same place. The template (and the project) is in the current status in my repository at github.com: https://github.com/andreasma/collective.TemplateUploadCenter > Maybe, you have somewhere else in your template another (possibly > inadvertant) call of the view? You can look at the project / script: https://github.com/andreasma/collective.TemplateUploadCenter/blob/master/collective/TemplateUploadCenter/skins/templateuploadcenter/templateuploadcenter_view.pt The expression should be in line 20 (currently I deleted it, because I get the error and could not work further on the add-on). Regards, Andreas -- ## Developer LibreOffice ## Freie Office-Suite für Linux, Mac, Windows ## http://LibreOffice.org ## Support the Document Foundation (http://documentfoundation.org) ## Meine Seite: http://www.amantke.de ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Plone-Users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-users |
|
Dieter Maurer |
|
|
Andreas Mantke wrote at 2012-1-10 21:26 +0100:
>Am Dienstag, 10. Januar 2012, 07:34:36 schrieb Dieter Maurer: >> Andreas Mantke wrote at 2012-1-9 20:45 +0100: >> >Am Montag, 9. Januar 2012, 10:14:45 schrieb Dieter Maurer: >> >> Andreas Mantke wrote at 2012-1-6 22:09 +0100: >> >> > ... >> >> > >> >> >I tried then to add a view to the add-on for the TemplateUploadCenter, >> >> >but I can't get it to work. I get only the base_view. I created a >> >> >page-template for the >> >> > >> >> >templatecenter but I get an error now with the TAL-expression: >> >> > <div metal:fill-slot="main" >> >> > >> >> > tal:define="view context/@@templateuploadcenter_view"> >> >> > >> >> >The traceback is here: http://pastie.org/3139263 >> >> >> >> Path expressions (like "context/@@templateuploadcenter_view") try >> >> to call the resulting object. If this is really a view, you might >> >> not want it to be automatically called here. Then, you could >> >> use >> >> >> >> tal:define="view nocall:context/@@templateuploadcenter_view"> >> >> >> >> instead. >> > >> >thanks for your hint, but it doesn't solve the issue. I get nearly the >> >same error message. >> >> From the same location inside your template (containing the "view" >> definition above)? >> That would be surprising. >> > >yes, it's at the same place. >The template (and the project) is in the current status in my repository at >github.com: >https://github.com/andreasma/collective.TemplateUploadCenter > >> Maybe, you have somewhere else in your template another (possibly >> inadvertant) call of the view? > >You can look at the project / script: >https://github.com/andreasma/collective.TemplateUploadCenter/blob/master/collective/TemplateUploadCenter/skins/templateuploadcenter/templateuploadcenter_view.pt The original traceback came from the rendering of the "templateuploadcenter_view" view. With the "nocall:", the view will no longer be rendered (at least not at this place). Maybe, your change has not yet been effective (Plone was not restarted), when you have retried after the change? If the problem remains, I suggest to post again the full error information (including traceback info from your "error_log") -- for the modified template (including the "nocall:"). -- Dieter ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Plone-Users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-users |
|
|
Hi Dieter,
Am Mittwoch, 11. Januar 2012, 08:23:38 schrieb Dieter Maurer: > Andreas Mantke wrote at 2012-1-10 21:26 +0100: > >Am Dienstag, 10. Januar 2012, 07:34:36 schrieb Dieter Maurer: > >> Andreas Mantke wrote at 2012-1-9 20:45 +0100: > >> >Am Montag, 9. Januar 2012, 10:14:45 schrieb Dieter Maurer: > >> >> Andreas Mantke wrote at 2012-1-6 22:09 +0100: > >> >> > ... > >> >> > > >> >> >I tried then to add a view to the add-on for the > >> >> >TemplateUploadCenter, but I can't get it to work. I get only the > >> >> >base_view. I created a page-template for the > >> >> > > >> >> >templatecenter but I get an error now with the TAL-expression: > >> >> > <div metal:fill-slot="main" > >> >> > > >> >> > tal:define="view context/@@templateuploadcenter_view"> > >> >> > > >> >> >The traceback is here: http://pastie.org/3139263 > >> >> > >> >> Path expressions (like "context/@@templateuploadcenter_view") try > >> >> to call the resulting object. If this is really a view, you might > >> >> not want it to be automatically called here. Then, you could > >> >> use > >> >> > >> >> tal:define="view nocall:context/@@templateuploadcenter_view"> > >> >> > >> >> instead. > >> > > >> >thanks for your hint, but it doesn't solve the issue. I get nearly the > >> >same error message. > >> > >> From the same location inside your template (containing the "view" > >> definition above)? > >> That would be surprising. > > > >yes, it's at the same place. > >The template (and the project) is in the current status in my repository > >at github.com: > >https://github.com/andreasma/collective.TemplateUploadCenter > > > >> Maybe, you have somewhere else in your template another (possibly > >> inadvertant) call of the view? > > > >You can look at the project / script: > >https://github.com/andreasma/collective.TemplateUploadCenter/blob/master/c > >ollective/TemplateUploadCenter/skins/templateuploadcenter/templateuploadce > >nter_view.pt > > The original traceback came from the rendering of the > "templateuploadcenter_view" view. With the "nocall:", the view will no > longer be rendered (at least not at this place). > Maybe, your change has not yet been effective (Plone was not > restarted), when you have retried after the change? > > If the problem remains, I suggest to post again the full error information > (including traceback info from your "error_log") -- for the modified > template (including the "nocall:"). I managed to solve my problem in the meantime. I made some more changes to the code and tried to deactivate and then activate the add-on. Then I get an issue with viewing the content of any TemplateUploadCenter (already created and new ones). I was told that there is no stuff like that on the server and my status was shown as anonymus user. I looked at the error messages (I changed to catch them all before) and saw the issue about the missing view. I changed everything back to templateuploadcenter_view, deactivated and activated the add-on and then it worked. I'll commit all my changes today. Thanks for your patience. I'm one step forward now. Regards, Andreas -- ## Developer LibreOffice ## Freie Office-Suite für Linux, Mac, Windows ## http://LibreOffice.org ## Support the Document Foundation (http://documentfoundation.org) ## Meine Seite: http://www.amantke.de ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Plone-Users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-users |
| Powered by Nabble | Edit this page |