-
Anonymous
Hi, I am having an issue with my website.
I am using GeneratePress pro (the latest version).
Although I have ended up with a critical error.
This seems to be in the class-conditions.php.
I will quickly explain what I think it was that caused it:
So, I have a “duplicate post” plugin installed.
And I used the “duplicate” option to clone a “custom element” I was using (a button in my menu).
And when I did this, I got the critical error.I can’t really give access to the site / hosting as it’s a private site, but if someone could guide me in what to do, I would really appreciate it.
I think all I need to do is figure out how to delete the new element from within file manager, but I couldn’t locate the actual elements themselves.
Also, I know it is the GeneratePress Pro plugin causing it, as I deactivated the plugin from within file manager and it went back online. But, then re-installed it and it got the error again.
Thank you in advance for any help,
M.P.S.
In the “error log” for my website, it shows that the error is because of line 330 in the class-conditions.php file.
But, I think if there is a way for me to just delete the duplicated element, I really think it’s all going to go back to normal… maybe? lol (I’m not the best at this stuff!)
Here are lines 227-342 if you can spot anything that shouldn’t be here:
// Show depending on location conditionals.
if ( ! $show ) {
foreach ( (array) $conditionals as $conditional ) {
if ( in_array( ‘general:site’, $conditional ) ) {
$show = true;
} elseif ( is_singular() && in_array( ‘general:singular’, $conditional ) ) {
$show = true;
} elseif ( is_archive() && in_array( ‘general:archive’, $conditional ) ) {
$show = true;
} elseif ( ! empty( $current_location[‘rule’] ) && in_array( $current_location[‘rule’], $conditional ) ) {
if ( ! isset( $conditional[‘object’] ) || empty( $conditional[‘object’] ) ) {
$show = true;
} else {
if ( in_array( $current_location[‘object’], $conditional ) ) {
$show = true;
} -
Hi there,
Can you access the admin panel and disable GP premium?
And do you know the ID of the GP element?
-
Anonymous
Yes, I have already done that to prevent the error while I work on the site.
But, I can’t activate the plugin to delete the element causing the issue.
No, unfortunately I don’t know the ID.
Is there anything else we can try?
(and thank you very much for your help)
-
Fernando
Hi Martie,
You can delete it from the Database. Just go to the wp_posts table and the
post_type
should begp_elements
. Just look for it, there should be a date there as well to let you define what’s the latest Element you created. -
Anonymous
Thank you Fernando, I tried deleting all of the entries related to the custom element from the day the error started, but unfortunately this didn’t work.
Is there anything else I could try at all?
Thanks for your help so far, I really appreciate it.
M. -
If you edit the entries in the database you can set each of the elements
status
todraft
If you do that, can you then load the site and access the elements panel ? -
Anonymous
Okay guys, yous both really helped, I finally got it by searching “gp_elements” again, somehow there was one I missed.
I got it fixed and this has now been resolved 🙂
-
Glad to hear that!
- You must be logged in to reply to this topic.