Open maltmann-muc opened 11 months ago
Oxy 4.8 RC 1: Issue persists, but reporting for menu item "Oxygen QA Check" seems gone.
Oxy 4.8: Issue persists,
Confirmed and reported internally via https://github.com/soflyy/oxygen/issues/5187 and https://github.com/soflyy/oxygen/issues/5255
Oxy 4.8.3: Issue persists.
Apparently, this can be solved easily by replacing the parent slug (null) in add_submenu_page with an empty string ('').
Yes, absolutely. The first parameter must be a string, not null
.
Sorry @maltmann-muc, just seconds before your response I removed my comment, because my solution to replace the parent slug null by an empty string as Yoast has done, created a new error. The empty string returned: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated (wp-admin/admin-header.php:36)
Sorry @maltmann-muc, just seconds before your response I removed my comment, because my solution to replace the parent slug null by an empty string as Yoast has done, created a new error. The empty string returned: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated (wp-admin/admin-header.php:36)
I can't imagine why an empty string should cause any issues. An empty string is not null
. Maybe I find some time to investigate
In my request I suggested 'null'
(as string) which doesn't cause any issues – since at least a year where I used this modification.
The error occurs when accessing the submenu pages that have an empty parent slug. No title, not even an empty string, is returned by the function get_admin_page_title() (wp-admin/admin-header.php:35). Using any fake slug will probably do the trick. BTW: Yoast has the same problem for submenu pages with empty strings parent slugs.
The error occurs when accessing the submenu pages that have an empty parent slug. ... Using any fake slug will probably do the trick.
Thank you for reporting.
Then my initial suggestion using 'null'
(= fake slug) will work – as I can confirm from experiences.
@Spellhammer Why does this remain unfixed?
Oxy 4.9: Issue persists.
Environment: PHP 8.1, WP 6.4.1, Oxy 4.7.1 Situation: In general for every backend screen
Files and Functions: wp-content/plugins/oxygen/component-framework/admin/pages.php • ct_admin_settings() • oxygen_vsb_register_signing_page() • oxygen_vsb_regenerate_css() wp-content/plugins/oxygen/component-framework/includes/oxygen-connection.php • oxygen_vsb_connection_register_options_page()
Warning and Call Stack: (Sample for one of the four cases)
Description: Oxygen calls add_submenu_page() to add 'Add 3rd Party Design Set', 'Oxygen Sign Shortcodes', 'Oxygen Regenerate CSS', 'Oxygen QA Check', passing null as first parameter. First parameter to add_submenu_page is a required string.
Solution: For all four occurrences, change add_submenu_page(null, ... to add_submenu_page('null', ...