Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Elements in GeneratePress Dashboard after Latest Update #641

Open
FunkyCss opened this issue Sep 10, 2024 · 10 comments
Open

Missing Elements in GeneratePress Dashboard after Latest Update #641

FunkyCss opened this issue Sep 10, 2024 · 10 comments
Labels
bug Bugs, unexpected and weird behaviors triage Awaiting review

Comments

@FunkyCss
Copy link

Elements Missing from Dashboard After Latest Update - Hooks, Headers, Layouts

Description:
I've been using the Elements feature in GeneratePress for over 6 years, primarily on a WooCommerce website with minimal plugins. Recently, after updating to the latest versions of GeneratePress and GP Premium, I noticed several of my Elements (Hooks, Headers, Layouts) have disappeared from the WordPress dashboard.

Key Points:

  1. The missing Elements (Hooks, Headers, Layouts) are functioning correctly on the front end but are not visible in the dashboard.
  2. Block Elements still appear and function normally.
  3. The issue persists after disabling all plugins except GP Premium and remains even when using both the child theme and the default GP theme.
  4. I am using the latest version of GeneratePress (I was also testing the Alpha version, but the issue remains after reverting).

Debugging Findings:

  • Creating a new Administrator user allows that user to view all Elements, including Hooks, Headers, and Layouts, while the original user cannot.
  • PHP log warning related to a deprecated function:
    [06-Aug-2024 11:24:51 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/wp-content/plugins/gp-premium/colors/functions/functions.php on line 1498
    
    However, I don’t believe this is directly related to the issue.

Potential Cause:
I suspect the issue could be related to the recent updates of GeneratePress or GP Premium, possibly something connected to autoloading issues affecting user roles/permissions for viewing Elements in the dashboard.

Steps to Reproduce:

  1. Update to the latest version of GeneratePress and GP Premium.
  2. Check the dashboard for the visibility of Elements like Hooks, Headers, and Layouts.

Expected Behavior:
All previously created Elements (Hooks, Headers, Layouts) should be visible in the dashboard after the update.

Actual Behavior:
These Elements are missing from the dashboard for the original user but appear when a new Administrator user is created.

Additional Information:
This issue has persisted after the latest GP update and across multiple websites. Could this be related to autoload issues? Any insights into this would be appreciated, as I currently have to create new admin users to regain visibility of Elements.

GP - Topic - > https://generate.support/topic/elements-hooks-headers-layouts-missing-from-dashboard/#post-130572

Let me know if further information or access is needed for testing.

@FunkyCss FunkyCss added the bug Bugs, unexpected and weird behaviors label Sep 10, 2024
@github-actions github-actions bot added the triage Awaiting review label Sep 10, 2024
@tomusborne
Copy link
Owner

I'm not able to reproduce this on my end.

When you go to "Screen Options" at the top right, is the Display Rules checkbox checked?

If it is, when you right-click + Inspect the page, are there any red errors in the "Console" tab?

@FunkyCss
Copy link
Author

Hi Tom

This issue is related to users and is happening from the Alpha Version of GP theme and GGP.

I remember that as I was testing it and opened a ticket in the support forum.

Today I noticed this once again, and just checked the forum and saw many users have reported it.

From my end there is no console error.

The temp solution to this is to add a new admin user - and you can see the elements content.

Also this will not affect any type of Block Element.

Hope this information helps.

@tomusborne
Copy link
Owner

Do you have a staging site where this is happening? It would help a lot if I could see it myself (especially if I had access to the database). If so, any chance you could email me details to GP support?

If not, I'll continue to try to debug, but I'm not seeing the issue on any of my own dev or live websites.

@tomusborne
Copy link
Owner

Just had an idea.

Does adding this function to your site fix the issue?:

add_action( 'admin_head', function() {
	echo '<style>#generate_premium_elements.closed .inside {display: block;}</style>';
} );

@FunkyCss
Copy link
Author

FunkyCss commented Sep 10, 2024

Tom absolutely I can share a staging site with you, I will do that if you want.

The action did something, take a look - has a message also inside

Untitled-2

Untitled-33

@tomusborne
Copy link
Owner

Looks like the action fixed the issue.

It seems that the metabox collapsed by default for some people for some reason, and since we hide the "Handle" with the ability to uncollapse it, it's not possible to make it appear again.

For now, that action is the solution. We'll release a patch with this code included by default.

@Shibumi-Agency
Copy link

Hi Tom,
had the same issue and @FunkyCss helped me solve it.
I was able to see the panels again but the floating was all wrong. Disabling it fixes the problem for me.
I'm posting the code that works for me:

add_action( 'admin_head', function() {
	echo '<style>#generate_premium_elements.closed .inside {display: block;} .postbox-container {float:none;}</style>';
} );

Hope it will help someone in the future.

@FunkyCss FunkyCss reopened this Sep 11, 2024
@diggeddy
Copy link
Collaborator

For @Shibumi-Agency support topic reference and test site see support topic:
https://generate.support/topic/hook-element-admin-panel-not-showing/#post-130755

@diggeddy
Copy link
Collaborator

The issue reported by @Shibumi-Agency is only in the Safari Technology Preview browser.
Not sure why as it can't see their being any updates that would cause this; but it smacks of a legacy Safari Floats bug that was patched way back.

Options:
A - We ignore the issue for now and see what happens in the next Safari browser release
B - we set: .postbox-container {float:none;} . It looks like the float: left is redundant as removing it had no effect on other browsers.

@FunkyCss
Copy link
Author

Hi @diggeddy I have followed the issue in the support forum, I can say that this issue for me is on Chrome and Firefox.

I am using for now the action Tom Provided to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs, unexpected and weird behaviors triage Awaiting review
Projects
None yet
Development

No branches or pull requests

4 participants