Ticket #10903 (closed Bug: fixed)

Opened 4 years ago

Last modified 3 years ago

hidding viewlet for * (all) skins not working

Reported by: garbas Owned by: WouterVH
Priority: minor Milestone: 4.1
Component: General Version:
Keywords: viewlet genericsetup TuneUp greenbelt Cc:

Description (last modified by garbas) (diff)

hidding viewlet for all themes i think is a quite common scenario when ou write a addon. when you define skin this is working (you can hide it) but when you try to hide it for all themes then you have problem. it only does this for "Plone Classic Theme" which is kinda strange.

this is code that is working, but only for selected theme (viewlets.xml)

<?xml version="1.0"?>
<object>
    <hidden manager="plone.belowcontent" skinname="Plone Default">
        <viewlet name="plone.comments" />
    </hidden>
</object>

and this is code that is not working

<?xml version="1.0"?>
<object>
    <hidden manager="plone.belowcontent" skinname="*">
        <viewlet name="plone.comments" />
    </hidden>
</object>

this bug was discovered on Plone4rc1 and freshly created plone site

p.s. i've assign it to you florian as i see from pypi page that you are the mantainer of the package

Change History

comment:1 Changed 4 years ago by garbas

  • Description modified (diff)

comment:2 Changed 4 years ago by garbas

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

(In [38717]) fixes #10903, listing skins is not done right because in storage._hidden there are only themes listing hidden viewlets. in default plone install that is only "Plone Classic Theme". not sure this should only apply here or in any other pard of the code. but it fixes my usecase described in ticket.

comment:3 Changed 4 years ago by garbas

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:4 Changed 4 years ago by garbas

no quite there yet ... skins should be loaded from portal_skins (via irc:davisagli)

comment:5 Changed 4 years ago by garbas

  • Reporter changed from fschulzegarbas to garbas

comment:6 Changed 4 years ago by garbas

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

(In [38718]) fixes #10903 (again :P), when trying to hide viewlets from skins it now actualy does this for all skins registered in portal_skins

comment:7 Changed 3 years ago by esteele

(In [46751]) Revert [38717] and [38718] as they broke the existing tests. Please update the tests accordingly (installation of plone.app.vocabularies) and resubmit. Refs #10903

comment:8 Changed 3 years ago by esteele

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:9 Changed 3 years ago by calvinhp

  • Keywords TuneUp greenbelt added

comment:10 Changed 3 years ago by calvinhp

  • Milestone changed from 4.0 to 4.x

comment:11 Changed 3 years ago by esteele

  • Milestone changed from 4.x to 4.1

comment:12 Changed 3 years ago by WouterVH

skins should be loaded from portal_skins

But the xml you are importing can contains statements to new theme(s) as well.

In r48930, I checked in 3 failing tests demonstrating problems with skinname="*". 2 new tests, + one existing test changed: In "test_fragment_skip_purge" importing

_FRAGMENT2_IMPORT = """\
<?xml version="1.0"?>
<object>
 <order manager="top" skinname="*">
  <viewlet name="four" insert-after="three"/>
 </order>
</object>
"""

ignores the skin that only has hidden viewlets (light). This is related with the propososed fix.

comment:13 Changed 3 years ago by WouterVH

  • Status changed from reopened to new
  • Owner changed from fschulze to WouterVH

r48934 contains a modified patch that fixes the failing tests.

Also plone.app.vocabularies is now a new dependency of plone.app.viewletmanager. (danger of circular dependencies?)

comment:14 Changed 3 years ago by WouterVH

This ticket seems to be a duplicate of https://dev.plone.org/plone/ticket/7166 that was fixed on the 1.x branch 6 months ago.

comment:15 Changed 3 years ago by WouterVH

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

comment:16 Changed 22 months ago by davisagli

  • Component changed from Infrastructure to General
Note: See TracTickets for help on using tickets.