Quantcast

need help removing portlet through generic setup

classic Classic list List threaded Threaded
7 messages Options
Maarten Nieber Maarten Nieber
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

need help removing portlet through generic setup


(I posted this on plone.product-developers also, but it belongs here...)

Hi,

I've been having problems configuring my portlets. According to the
@@manage_portlets view, I have no portlets in the right column. However, Plone
reserves an empty space on the right side of the screen for showing portlets.

I installed a workaround (I hacked into the sunburst theme to not show any
portlets in the right column) but I really need to fix this properly (I cannot
test the patience of my client too long).

I got the idea of exporting my portlets settings using the export tool. The
result shows me that there are in fact portlets configured in the right column.
I edited the xml to the short piece below, which I hope will remove the
portlets.

So far, I have not been succesfull, and I'm left with some questions:

- the import tool lets you select the target profile. However, the export tool
does not let you select the source profile. Does this mean that the export tool
always exports the config that results from combining all profiles?

- if this is the case, how does one know in which profile to import the modified
configuration settings?

- I added purge="False" in the root "portlets" tag (see below). Is this the
correct way to ensure that my piece of XML does not replace the entire existing
portlets config?

- I added remove="True" to the assignment statements that (I think) assign the
portlet to the right column. Is this the correct way to remove the assignment? I
tried importing this into several profiles, but when I check (by exporting
portlets.xml) the assignments are still there.

Many thanks,
Maarten

<?xml version="1.0"?>
<portlets purge="False">
 <assignment name="news" category="context" key="/"
    manager="plone.rightcolumn" type="portlets.News" visible="True"
remove="True">
  <property name="count">5</property>
  <property name="state">
   <element>published</element>
  </property>
 </assignment>
 <assignment name="events" category="context" key="/"
    manager="plone.rightcolumn" type="portlets.Events" visible="True"
remove="True">
  <property name="count">5</property>
  <property name="state">
   <element>published</element>
  </property>
 </assignment>
 </portlets>




------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Dieter Maurer Dieter Maurer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: need help removing portlet through generic setup

Maarten Nieber wrote at 2012-3-28 08:33 +0000:
>I've been having problems configuring my portlets. According to the
>@@manage_portlets view, I have no portlets in the right column. However, Plone
>reserves an empty space on the right side of the screen for showing portlets.

This is strange.

Plone4 controls the space for "columns" via
"plone.app.layout.globals.layout.LayoutPolicy.have_portlets".
Apparently, the right column renderer says "visible=True".
Maybe, you want to debug "have_portlets" to find out why.

> ...
>I got the idea of exporting my portlets settings using the export tool. The
>result shows me that there are in fact portlets configured in the right column.
>I edited the xml to the short piece below, which I hope will remove the
>portlets.
>
>So far, I have not been succesfull, and I'm left with some questions:
>
>- the import tool lets you select the target profile. However, the export tool
>does not let you select the source profile.

Export always exports the current state -- not split across profiles
(it does not know the contribution of a specific profile to the current state).

>Does this mean that the export tool
>always exports the config that results from combining all profiles?

Yes -- from all profiles that have been imported to produce the current
state.


>- if this is the case, how does one know in which profile to import the modified
>configuration settings?

Profiles are there to allow modularization, e.g. based on independent
extension.
For "manual" changes (not associated with a specific extension),
you simple import a tgz.

> ...
>- I added remove="True" to the assignment statements that (I think) assign the
>portlet to the right column. Is this the correct way to remove the assignment? I
>tried importing this into several profiles, but when I check (by exporting
>portlets.xml) the assignments are still there.

It is the standard way, "GenericSetup" provides to remove things
from the configuration. "portlets" insist that the attribute is
not only there, but also has a boolean "true" value ("true", "yes" or "1",
case insensitive).



--
Dieter

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Maarten Nieber Maarten Nieber
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: need help removing portlet through generic setup

Hi Dieter,

> Maybe, you want to debug "have_portlets" to find out why.

I remember trying this, I will try again.
 
> Profiles are there to allow modularization, e.g. based on independent
> extension.
> For "manual" changes (not associated with a specific extension),
> you simple import a tgz.

Can you tell me where in the management interface I can do this import?
I only know of portal_setup/import, but that one is profile specific.


Thanks,
Maarten



------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Raphael Ritz-3 Raphael Ritz-3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: need help removing portlet through generic setup

On 3/30/12 10:16 AM, Maarten Nieber wrote:

> Hi Dieter,
>
>> Maybe, you want to debug "have_portlets" to find out why.
> I remember trying this, I will try again.
>
>> Profiles are there to allow modularization, e.g. based on independent
>> extension.
>> For "manual" changes (not associated with a specific extension),
>> you simple import a tgz.
> Can you tell me where in the management interface I can do this import?
> I only know of portal_setup/import, but that one is profile specific.

In ZMI -> portal_setup -> import tab
all the way at the bottom next to the "import all steps"
and "import selected steps" you can browse to upload
a file (tarball) and have settings defined there be applied.

Don't you see that?

Raphael

>
>
> Thanks,
> Maarten
>
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Plone-Users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-users


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Maarten Nieber Maarten Nieber
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: need help removing portlet through generic setup

> In ZMI -> portal_setup -> import tab
> all the way at the bottom next to the "import all steps"
> and "import selected steps" you can browse to upload
> a file (tarball) and have settings defined there be applied.
>
> Don't you see that?
>

Thanks. Yes, I had seen it, but I assumed that 'import tar ball' also imports
the settings into the selected target profile (there was no reason to assume
it operates in a different way compared to the other import buttons).


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Dieter Maurer Dieter Maurer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: need help removing portlet through generic setup

Maarten Nieber wrote at 2012-3-30 09:44 +0000:

>> In ZMI -> portal_setup -> import tab
>> all the way at the bottom next to the "import all steps"
>> and "import selected steps" you can browse to upload
>> a file (tarball) and have settings defined there be applied.
>>
>> Don't you see that?
>>
>
>Thanks. Yes, I had seen it, but I assumed that 'import tar ball' also imports
>the settings into the selected target profile (there was no reason to assume
>it operates in a different way compared to the other import buttons).

"import" does not import into a "target profile".
The profile you select specifies the source (unless you import from tarball).



--
Dieter

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Maarten Nieber Maarten Nieber
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: need help removing portlet through generic setup

I fixed the problem by debugging the @@portlet_manager view.
It turned out there WERE two portlets installed (news and events),
but for some reason, they did not show up in the portlet_manager view.
In the debugger, I could see that a delete_url was generated for the news
portlet:

http://localhost:8080/ra/++contextportlets++plone.rightcolumn/@@delete-portlet?
name=news

By placing this url in the browser, both (!) portlets were removed.
So i don't know what the root of the problem was, but it's solved now.



------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Loading...