I’ve added a Gist which contains three files to update this plugin to work with PHP 8.1 and WP 6.4.2.
Adds code which checks for a valid array property in two cases. The file tabify-edit-screen.php is not really necessary, but contains the info where changes have been made in the plugin for a better overview.
Gist URL:
https://gist.github.com/jotazzu/3d74c0c6f989148e7ea79a82b67edfdf
I was using this plugin with WordPress version 6.1.1 and PHP version 8.1.12, and I got a “rray offset on value of type bool in —. /plugins/tabify-edit-screen/inc/edit-screen.php on line 182” error message.
I downgraded the PHP version to 7.4.33 in the server side configuration and this error no longer occurs.
Please let me know how to address this issue, as I am very interested in this plugin and would like to continue using it.
Thank you in advance.
]]>In version 1.0.0, these issues I posted 2 years ago, is still present:
Metaboxes are often and inconsistently and seemingly random not showing up in the Tabify Edit Screen settings window. That time I tracked it down to how transients are set.
The metaboxes are correcly showing in the post edit screens.
I have several notices with php7.4. I am using version 1.0.0.
Trying to access array offset on value of type bool.
wp-content/plugins/tabify-edit-screen/inc/edit-screen.php:181
wp-content/plugins/tabify-edit-screen/inc/edit-screen.php:182
[ O S ] Windows 10
[Server] XAMPP 7.3.22
[ PHP ] 7.4.10
[ D B ] MariaDB 10.3.15
[ W P ] 5.5.1-ja
It may be only my environment, but I have a problem because it is occurring.
“Tabify Edit Screen” can be used to display three display items on a fixed page.
I am setting custom fields using “Advanced Custom Fields”, but there is a place to set “Hidden items” in the setting items, and check “Content editor” in the setting items in it If you select a tab other than the first tab set in the “Tabify Edit Screen” and immediately return to the first tab, the hidden “Content Editor” will be displayed. It has become like.
Furthermore, I am using the “classic editor”, and even though the menu icons should be side by side, they are eroding the input part of the editor.
This phenomenon also occurs in an environment where “Advanced Custom Fields” is not used.
In addition, considering browser dependence, we have confirmed reproducibility on Google Chrome and Windows Edge.
Maybe it’s not working well because of the “classic editor” environment.
If you are suffering from the same symptom and have now resolved it, could you please teach me how to deal with it?
I look forward to working with you.
]]>No console errors and using PHP 7.3. It worked with WP 5.4* but not with latest 5.5. Metaboxes simply doesn’t divide under tabs on load, it works only when Im going to a tab and then they are correctly.
Any ideas?
]]>A notice in php7.4 :
Notice: Trying to access array offset on value of type bool in /home/root/test_html/dev2/wp/wp-content/plugins/tabify-edit-screen/inc/edit-screen.php on line 85
Unfortunately the patch provided by ricflomag2 does not work as expected. E.g. the variables $metabox_id
and $class
are empty when executed in the scope of the anonymous function. A construct like function() use ($class) { ... $x = $class; ... }
has to be used to induce variables from the parent scope.
I’ve uploaded a patched version of file edit-screen.php to Gist. Now the new anonymous functions give the same result as the previous create_function() calls.
Gist URL: https://gist.github.com/jotazzu/25c20fba42e3dc6c40d80439058a8786
]]>Hi there,
Here is a patch to solve the warning about create_function() being deprecated in php 7.2. There is no way to attach a file, so I paste it.
$ diff -ur edit-screen.php edit-screen.php72.php
--- edit-screen.php 2019-02-15 14:39:26.735882831 +0100
+++ edit-screen.php72.php 2019-02-15 14:39:15.627788872 +0100
@@ -118,11 +118,11 @@
if ( ! in_array( $metabox_id, $default_metaboxes ) ) {
if ( $metabox_id == 'titlediv' || $metabox_id == 'postdivrich' ) {
- $func = create_function('', 'echo "jQuery(\"#' . $metabox_id . '\").addClass(\"' . $class . '\");";');
+ $func = function(){echo "jQuery(\"#' . $metabox_id . '\").addClass(\"' . $class . '\");";};
add_action( 'tabify_custom_javascript' , $func );
}
else {
- $func = create_function( '$args', 'array_push( $args, "' . $class . '" ); return $args;' );
+ $func = function($args){array_push( $args, "' . $class . '" ); return $args;};
add_action( 'postbox_classes_' . $post_type . '_' . $metabox_id, $func );
if ( isset( $this->all_metaboxes[ $metabox_id ] ) ) {
@@ -153,7 +153,7 @@
$class .= ' tabifybox-hide';
}
- $func = create_function( '$args', 'array_push( $args, "' . $class . '" ); return $args;' );
+ $func = function($args){array_push( $args, "' . $class . '" ); return $args;};
add_action( 'postbox_classes_' . $post_type . '_' . $metabox_id, $func );
}
}
@@ -180,7 +180,7 @@
else { //default
$tabs = $this->submit_button();
$tabs .= $this->editscreen_tabs->get_tabs_with_container();
- $func = create_function('', 'echo "$(\'#post\').prepend(\'' . addslashes( $tabs ) . '\');";');
+ $func = function(){echo "$(\'#post\').prepend(\'' . addslashes( $tabs ) . '\');";};
add_action( 'tabify_custom_javascript' , $func );
}
]]>
Is this plugin still under development? I was wondering how it works with the new Gutenberg editor.
]]>I have a setup with multiple Custom Post Types (via Pods) that have extra metaboxes, and a theme that adds extra metaboxes, and metaboxes from the theme added to the CPTs through a filter in functions.php.
These extra metaboxes are all there on the CPT edit screens, no problems. But the Tabify setting screen is a mess: these ‘extra’ metaboxes were more or less randomly showing up after clicking, saving settings, or saving posts.
I tried to track down what was happening and found out the following factors in play:
– In detection.php, a transient is set for all extra metaboxes. This is where it goes wrong. Somehow these transients sometimes are set correctly and sometimes not or incomplete. On top of that, in the same script is a return for if a transient has been set. So if the transient is already set, but wrong or empty, the mess is complete and it does not change anymore.
– For me the only way to sort of fix all metaboxes was adding a delete_transient before the set_transient function. And to temporarily remove the return.
Then save a post for each post type (also confusing, otherwise it does not work). Then when all transients set correctly, re-set the return in the detection script.
– I am not sure why these transients are acting so buggy and why updating the transient does not seem to work consistently without deleting it first.
– I have read that object caching could also be in play, but I have not installed any caching yet.
I also downloaded the latest version of this plugin (1.1.0) from github. I have seen that the whole detection script and transients are set up differently there. But the behaviour with this version was equally buggy. Not being sure of the status of these files, as they are not released yet, I reverted to 0.9.7 and more or less fixed it like above.
When I have new metaboxes now, I will go through the same manual procedure. Not very handy but it seems the only way.
I hope this will get fixed in a new version.
]]>In a closed topic somebody else wrote this:
When switching tabs and then returning to the main editor there is a large gap between the Visual/Text tabs and the edit area. Also, all content in the edit area is missing. This is temporarily corrected when resizing the browser window or scrolling. If I disable “Enable full-height editor and distraction-free functionality” in Screen Options the issue is resolved.
Anyone else with this same problem? Temporary solution (other than disabling the distraction free feature)?
I had the same and it is very annoying.
Hopefully the plugin author will fix this. In the meantime some workarounds:
The cause is an incompatibility of the Tabify Edit Screen plugin with WordPress functionality in wp-includes/editor-expand.js, which is for the full-screen/full-height/distraction free editor functionality.
A few ways to solve it:
1/ Disable ‘distraction-free functionality’ in Screen Options.
2/ Disable this functionality completely, but you also lose full screen writing mode. Put this in functions.php:
add_action('admin_enqueue_scripts', 'remove_admin_script_editorexpand', 100);
function remove_admin_script_editorexpand() {
wp_dequeue_script('editor-expand');
}
3/ In wp-includes/editor-expand.js is a function called adjust() which is the cause of the gap above the editor. To solve this issue, this adjust() function needs to be triggered on a click of a Tab. You can add some jQuery to the admin area, to trigger this function, which will solve the issue:
First add a js file to the theme and call it adminscript-tabify.js for example:
jQuery(function($) {
$( ".tabify-tab" ).on("click", function() {
$(document).trigger('resize.editor-expand');
});
});
Then call the script in functions.php:
if (is_admin()) {
wp_register_script( 'adminscript-tabify', get_template_directory_uri() . '/{path-to-script}/admin-tabify.js', array(
'jquery', 'tabify-edit-screen'), 1.0, true );
wp_enqueue_script( 'adminscript-tabify' );
}
Don’t forget the / before {path-to-script}, and replace {path-to-script} with the path to the script in your theme directory.
]]>This is once again about Yeost not registering itself, what’s the current best approach for getting any particular module to let tabify know that it should include it in the list. You noted elsewhere that the old approach would no longer work.
]]>Hi,
Thanks for this great plugin, we use it everywhere !
Is there a way to make it work with ACF options pages ?
(acf_add_options_page)
If not, is it planned for future releases ?
Thanks !
]]>Your plugin is causing deprecated warnings in PHP 7.2
https://www.flowpress.com/screenshots/screenshot_2018-05-29_at_9.07.35PM.png
]]>Hello there,
First of all thank you for this plugin. It’s perfect for my use.
I have a feature request which will be very usefull for a lot and which can be developped very quickly : just give us the possibility to make tabs in the plugins list.
For very complex website, you have to deal with dozen of plugins. And having the possibility to group plugins in tab directly will be as valuable as tabify edit screen.
If you have the time to develop it, just do it.
Cheers.
]]>Hi Marko
I was wondering if I could sponsor an tweak like I have done before.
What I would like to be able to do is have the ability within Tabify to be able to flag a Metabox to be “removed” so that it is not loaded on the specific page when Tabify displays its tabs. I do not want to just hide the metabox but actual do a “remove_meta_box” so that the metabox is not load on the page therefore not take up resources etc.
Can you give me a price for doing this as it is something I would like to use in a project I am working on.
Thanks
Nathan
]]>Hi,
Please would you consider adding an option to the different post types to be able to hide the tabify tabs if only one tab exists. This could be done simply by adding a “display: none !important;” to the “div.tabify-tabs.tab-horizontal” css entry if the option was selected. If their is more than one tab then tabify would display the tabs as normal.
This then allows the display to look nicer when you have tabs for users and tabs for admin etc.
Nathan
]]>I′m using this plugin y Custom field suite. I have read in the Support page that these two plugins are compatible.
I’ve installed the last version of both of them. The problem is when I create customized fields with “Custom Field Suite”, since they don’t appear in Settings in Tabify Edit screen. However, these new fields do appear in the last tab in the post management, but I can`t organize them.
I don’t know how to refresh the list of metaboxes so that these fields are shown.
Please, how can I do to make these fields appear in the list?
Thank you very much.
]]>Hi
Has anyone else had an issue with Custom Post Types since the new slider On/Off was added. I am having an issue that I cannot enable tabs on Custom Post Types and they always say Off even though I try to turn them on. It works fine with the standard post types etc but not custom ones. I am sure this used to work for me but not anymore ??
Nathan
]]>This plugin looks great!!!
Is there any update coming soon?
If I am thinking about using this on a client’s website, I am concerned about the maintainability of such features and this totally depends on updates, which increase the chance for proper functioning in the first place and also security.
Warm regards,
Sebastian
Hi there,
Just found a bug where ordering isn’t working when re-arranging ACF and Pods.io meta boxes…
Here are a few screenshots
and the edit page renders as
https://i.imgur.com/J71Xg4V.png
https://i.imgur.com/CyNsnJZ.png
Where you see WordPress version is the Pods.io fields which should be above ACF
as per
Thanks
]]>This is a brilliant little gem for anyone dealing with multiple metaboxes. Makes the UI so much more manageable. One issue though. On a certain occasions, we have a post type that has different metaboxes on different circumstances. For example, the Front-page page type can have a different configuration from a regular page.
If create a tab dedicated to a specific page, that ends up showing on every page. Would it be possible hide tabs that don’t have metaboxes for given context?
HI, I cannot seem to get the filter to work to make a metabox always visible.
could you please provide an example?
not sure if it matters but the meta box I am trying to keep visible is ACF generated
thanks!
]]>Hi,
This was raised in a topic over a year ago but I’m wondering if you have made any progress or furthered the plans for a Global setting to make this work in a Network activated install ?
Even as a premium plugin maybe as I’m guessing anyone that needs this specific functionality would be monetizing their install anyway.
Thanks
]]>I discovered this issue in a closed topic but seems it has not been resolved.
When switching tabs and then returning to the main editor there is a large gap between the Visual/Text tabs and the edit area. Also, all content in the edit area is missing. This is temporarily corrected when resizing the browser window or scrolling. If I disable “Enable full-height editor and distraction-free functionality” in Screen Options the issue is resolved.
Anyone else with this same problem? Temporary solution (other than disabling the distraction free feature)?
]]>I like this plugin – it’s very handy but sadly if one is running AIOSEO and you put the SEO into a tab then the fields don’t show up.
]]>Hi,
for users other than the primary admin, the editing screen has all the tabs, but I cannot drag the widgets with categories, custom taxonomies etc from the sidebar to the main window.
I have ‘all users’ checked in the tabify settings.
Anything I can do to change this? Is this a wordpress setting?
]]>i didn’t get this thing the first time. you need to move that NEW TAB button to the top of the settings page so people will see it.
]]>Hi,
this would be a brilliant plugin for me, but I’m just not managing to get the tabs to show. I have checked the option for ‘posts’, and disabled all plugins that also interfered with the editor screen or posts (Advanced Post Excerpt, Custom Post Templates, Reveal IDs).
Any tips on what else to try?
Thanks!
]]>