Skip to content

Conversation

@petschki
Copy link
Member

@petschki petschki commented Sep 30, 2025

@mister-roboto
Copy link

@petschki 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!

@petschki
Copy link
Member Author

@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.

I get a traceback when I try to upgrade an existing site:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 390, in publish_module
  Module ZPublisher.WSGIPublisher, line 284, in publish
  Module ZPublisher.mapply, line 98, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module Products.GenericSetup.tool, line 1129, in manage_doUpgrades
  Module Products.GenericSetup.upgrade, line 191, in doStep
  Module plone.app.upgrade.v62.alpha, line 10, in update_tinymce_toolbar_menu_styles
  Module plone.registry.registry, line 164, in __setitem__
ValueError: Value must be a record

I know we had a similar error a while back, but I don't remember in which package.

I think you just need to set registry['name'] directly, but I did not try this.

@petschki
Copy link
Member Author

@jenkins-plone-org please run jobs

@mauritsvanrees
Copy link
Member

Now I get another error:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 390, in publish_module
  Module ZPublisher.WSGIPublisher, line 284, in publish
  Module ZPublisher.mapply, line 98, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module Products.GenericSetup.tool, line 1129, in manage_doUpgrades
  Module Products.GenericSetup.upgrade, line 191, in doStep
  Module plone.app.upgrade.v62.alpha, line 14, in update_tinymce_toolbar_menu_styles
TypeError: string indices must be integers, not 'str'

The value is this:

(Pdb) pp mce_menu
('{\n'
 '    "edit": {\n'
 '        "title": "Edit",\n'
 '        "items": "undo redo | cut copy paste pastetext | searchreplace '
 'textpattern selectall | textcolor"\n'
 '    },\n'
 '    "insert": {\n'
 '        "title": "Insert",\n'
 '        "items": "link media | template hr"\n'
 '    },\n'
 '    "view": {\n'
 '        "title": "View",\n'
 '        "items": "visualaid visualchars visualblocks preview fullpage '
 'fullscreen code"\n'
 '    },\n'
 '    "format": {\n'
 '        "title": "Format",\n'
 '        "items": "bold italic underline strikethrough superscript subscript '
 '| formats | removeformat"\n'
 '    },\n'
 '    "table": {\n'
 '        "title": "Table",\n'
 '        "items": "inserttable tableprops deletetable | cell row column"\n'
 '    },\n'
 '    "tools": {\n'
 '        "title": "Tools",\n'
 '        "items": "spellchecker charmap emoticons insertdatetime layer"\n'
 '    }\n'
 '}')

Is this expected? Or would this be the result of a Plone Site generated a while ago in a too-much-in-development 6.2 coredev and running some upgrade steps twice or something like that?

Looks like we need to call json.loads on it before editing.

(Pdb) pp json.loads(mce_menu)
{'edit': {'items': 'undo redo | cut copy paste pastetext | searchreplace '
                   'textpattern selectall | textcolor',
          'title': 'Edit'},
 'format': {'items': 'bold italic underline strikethrough superscript '
                     'subscript | formats | removeformat',
            'title': 'Format'},
 'insert': {'items': 'link media | template hr', 'title': 'Insert'},
 'table': {'items': 'inserttable tableprops deletetable | cell row column',
           'title': 'Table'},
 'tools': {'items': 'spellchecker charmap emoticons insertdatetime layer',
           'title': 'Tools'},
 'view': {'items': 'visualaid visualchars visualblocks preview fullpage '
                   'fullscreen code',
          'title': 'View'}}

@petschki
Copy link
Member Author

Sorry for that. I'll fix it later today.

@petschki
Copy link
Member Author

I've now correctly converted the JSON value and also take customized configurations into account.

@petschki
Copy link
Member Author

@jenkins-plone-org please run jobs

@mauritsvanrees mauritsvanrees dismissed their stale review October 1, 2025 13:25

It works now.

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.

Thanks, it works now.

@mauritsvanrees mauritsvanrees merged commit 00269ba into master Oct 1, 2025
19 checks passed
@mauritsvanrees mauritsvanrees deleted the tinymce-toolbar-menu-button-fix branch October 1, 2025 13:26
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