Themefragment not working in Plone 6.0.0b2 (worked in Plone 5.2)

@@contentlisting is fine, it returns a list of objects that I can iterate over.

Actually retrieving values from the objects, that's the issue!

I tried slide/title, slide/Title, ${python:slide.title}, ${python:slide.Title}, ${python:slide.title()}, then I decided to try to retrieve the object with getObject. That only caused an "insufficient priviliges" error.

Under normal circumstances I would use some kind of interactive tool like pdb settrace to troubleshoot but haven't found how to do that with Themefragments on Plone 6. Working blindly is the major problem here.

This is an example of my latest failure due to insufficient priveleges.

          <metal:block tal:repeat="slide_ context/slider/@@contentlisting">

            <tal:block tal:define="slide python:slide_.getObject();">
              <div class="txbl-slide-padding w-slide" style="transform: translateX(0px); opacity: 1;">

                  <span class="txbl-slider-box w-inline-block">
                    <h1 class="heading-3">${python:slide.Title()}</h1>
                    <h4 class="txbl-slider-subheading">${python:slide.Description()}</h4>

Maybe reconsider the themefragment approach and write a simple viewlet?

Yup... views and viewlets up ahead. Themefragments were so great in Plone 5 but so problematic at the moment in Plone 6.

Did you try to access the upper container? Maybe the problem is there. Sometimes you need some upper permission to access objects. Also, try to put some debug code here on collective.themefragments.traversal just before the exception. I would guess this:

            return zpt._exec(boundNames, args, kwargs)

because of the _ (underscore) in front of the function?

Also, try to revert Removed earlypatches/ by mauritsvanrees · Pull Request #3567 · plone/Products.CMFPlone · GitHub and see if something changes.

You probably don't need to use much python in the templates, I think this would work:

tal:define=" items folder/@@contentlisting|context/@@contentlisting|None;"  

<tal:repeat tal:repeat="item items" tal:condition="items|None">
<div tal:define="title item/title;
    item_url item/getURL|item/absolute_url">

    tal:define="obj item/getObject;