Skip to content

Conversation

thet
Copy link
Member

@thet thet commented Sep 22, 2025

@mister-roboto
Copy link

@thet thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@thet thet changed the title Expose the IClassicUISchema registry setting ``use_ajax_main_temp… Expose the IClassicUISchema registry setting use_ajax_main_template in the theming control panel. Sep 22, 2025
@thet thet requested a review from davisagli September 22, 2025 13:33
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a branch of plone.app.theming for Plone 6.1 first, right?

@thet
Copy link
Member Author

thet commented Sep 23, 2025

@davisagli that's right - here it is: plone/buildout.coredev#1037

@thet thet requested a review from davisagli September 23, 2025 15:31
@thet
Copy link
Member Author

thet commented Sep 23, 2025

@jenkins-plone-org please run jobs

@thet
Copy link
Member Author

thet commented Sep 23, 2025

@jenkins-plone-org please run jobs

@thet
Copy link
Member Author

thet commented Sep 24, 2025

@jenkins-plone-org please run jobs

The new IClassicUISchema.use_ajax_main_template setting needs latest plone.base
4.0.0a1 which is part of CMFPlone 6.2.
@thet
Copy link
Member Author

thet commented Sep 24, 2025

@jenkins-plone-org please run jobs

Otherwise you get a test failure:

```
  File "/home/runner/work/plone.app.theming/plone.app.theming/src/plone/app/theming/browser/controlpanel.py", line 223, in update
    self.use_ajax_main_template = use_ajax_main_template
  File "/home/runner/work/plone.app.theming/plone.app.theming/src/plone/app/theming/browser/controlpanel.py", line 113, in set_use_ajax_main_template
    self.classicui_settings.use_ajax_main_template = value
  File "/home/runner/work/plone.app.theming/plone.app.theming/.tox/py313-plone62/lib/python3.13/site-packages/plone/registry/recordsproxy.py", line 47, in __setattr__
    raise AttributeError(name)
AttributeError: use_ajax_main_template
```

This is needed until we have a 6.2 alpha release.
@thet
Copy link
Member Author

thet commented Sep 25, 2025

@jenkins-plone-org please run jobs

Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GHA is green now. Waiting for Jenkins for good measure. Can be merged when green.

And I finally tested it in a Python prompt and it works, resulting in a shorter html:

>>> import requests
>>> normal = requests.get("http://localhost:8080/Plone11/news")
>>> xhr = requests.get("http://localhost:8080/Plone11/news", headers={"X-REQUESTED-WITH": "XMLHttpRequest"})
>>> len(normal.text)
11164
>>> len(xhr.text)
5254

@thet thet merged commit 224b1c2 into master Sep 25, 2025
12 checks passed
@thet thet deleted the ajax_marker branch September 25, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants