Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After upgrading to the latest version of wysiwyg, this error started appearing:
Notice: Trying to get property of non-object in wysiwyg_admin_profile_title() (line 112 of /.../modules/contrib/wysiwyg/wysiwyg.module)
Its caused by wysiwyg_admin_menu_map which calls wysiwyg_profile_load_all(), which returns the wysiwyg profiles for disabled filter formats.
To reproduce:
* create text format, assign wysiwyg profile
* disable text format (status = 0 in database)
* clear cache
Comment | File | Size | Author |
---|---|---|---|
#1 | wysiwyg-disabled-format.2186591.1.patch | 467 bytes | TwoD |
Comments
Comment #1
TwoDThis should fix it.
I don't want to remove the profile completely, because Core is working on making it possible to re-enable formats, see linked issue.
Instead, let's just skip adding profiles for disabled formats to the menu tree.
The profile won't be visible from Wysiwyg's list, but you can technically still access it via the URL (with a few more notices being thrown, but I don't think we have to worry about those now).
Comment #2
TwoDI've committed this to 7.x-2.x.
Thanks for reporting this!
The -dev snapshot will be updated within 12 hours and this will be part of the next release.