-
AuthorPosts
-
February 27, 2015 at 1:31 am #403102
Hi!
I don’t know why this started but AviaPointer class is giving notices on ajax calls and media functionality breaks on wp-admin/upload.php. Ajax loader icon just keeps rolling and media thumbnails won’t appear.
PHP Notice: Trying to get property of non-object in …/wordpress/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/pointer.class.php on line 52, referer: …/wp-admin/post.php/wp-admin/upload.php
This notice is also firing on other pages but doesn’t seem to cause any problems.
The problem is that AviaPointer calls get_current_screen() function which returns null.
$screen = get_current_screen(); $this->screen_id = $screen->id;
The second line gives the error because $screen is null on ajax calls.
It seems that this code is executed on every ajax call. Is this really necessary? Pointers should be a one time thing, right?
A relevant stack trace:
pointer.class.php:51, AviaPointer->__construct()
template-builder.class.php:296, AviaBuilder->call_classes()
template-builder.class.php:97, AviaBuilder->admin_init()
template-builder.class.php:84, AviaBuilder->Init()I could fix the issue by adding the following check:
$screen = get_current_screen(); if(isset($screen)) { $this->screen_id = $screen->id; }
I’m not sure if this is the best way to do it. I don’t see the point in running the pointer code on ajax calls.
Could you fix this?
- This topic was modified 9 years, 8 months ago by jiv_e. Reason: Fix code formatting
February 27, 2015 at 9:05 pm #403647Hey jiv_e!
So the media upload is not working correct?
Let’s try the following.
1. Deactivate all plugins.
2. Completely delete Enfold from your WordPress theme directory before downloading + uploading a fresh copy from themeforest. After doing this you should be using Enfold 3.0.8.
If your still having trouble then send us a WordPress login and we’ll take a look.
Cheers!
ElliottMarch 16, 2015 at 9:05 pm #412577I’m’ getting the same error message. Any updates on this?
March 17, 2015 at 1:36 am #412704Hi @beezdezines,
Can you please create us a WordPress administrator account? post it here as a private reply.
Regards,
JosueMarch 17, 2015 at 11:02 am #412840This reply has been marked as private.March 17, 2015 at 7:57 pm #413194The front page isn’t loading now… Any help would be appreciated!
Thank you!March 17, 2015 at 11:29 pm #413297Hey!
The account provided is not an Administrator one, please change that.
Best regards,
JosueMarch 18, 2015 at 11:09 am #413510This reply has been marked as private.March 18, 2015 at 8:30 pm #413948Hi!
I was able to upload an image to your Library without issues, where does this error comes up?
Best regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.