Error Log - why is this error happening ? | Troubleshooting All in One SEO Pack Pro | Support | Semper Plugins

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
Error Log - why is this error happening ?
April 25, 2019
11:49 pm
Avatar
Deb Harris-Humeniuk
Member
AIOSEOP
Forum Posts: 38
Member Since:
May 1, 2017
sp_UserOfflineSmall Offline

HI In my error log, I am see a lot of lines that say

[26-Apr-2019 03:33:21 UTC] PHP Notice: Undefined variable: post_type in /home/mystore/public_html/wp-content/plugins/all-in-one-seo-pack-pro/aioseop_class.php on line 4249

Line 4249 is ( ( ” === $aiosp_nofollow ) && ( ! empty( $aioseop_options[‘aiosp_cpostnofollow’] ) ) && in_array( $post_type, $aioseop_options[‘aiosp_cpostnofollow’] ) )

Can you please advise why this might be happening and what I can do about it ?

I also have 2 custom code snippets that relate to your plugin, both of which you gave me

1. A custom meta description

add_filter( ‘aioseop_description’, ‘aioseop_mod_wc_desc’, 10, 1 );

function aioseop_mod_wc_desc( $original_description ){
// Product title – sku – Product description.
$sku = ”;
$product_description = ”;
$title = ”;

global $post;
if( ‘product’ !== $post->post_type || ! is_single() ){
return $original_description;
}
$title = $post->post_title;

$sku = get_post_meta($post->ID, ‘_sku’, true);

$product_description = $post->post_content;

$product_description = preg_replace( ‘/[\p{Z}\s]{2,}/u’, ‘ ‘, $product_description);

$meta_description = “$title – $sku – $product_description”;

$aio = new All_in_One_SEO_Pack;
$meta_description = $aio->trim_excerpt_without_filters( $meta_description );

return $meta_description;
}

2. A snipptt to remove the admin nag

add_action(‘admin_menu’, ‘aioseop_remove_update_notice’);
function aioseop_remove_update_notice(){
global $aioseop_update_checker;
remove_action(‘admin_notices’, array($aioseop_update_checker, ‘key_warning’));
}

April 26, 2019
8:15 am
Avatar
Deb Harris-Humeniuk
Member
AIOSEOP
Forum Posts: 38
Member Since:
May 1, 2017
sp_UserOfflineSmall Offline

ok I think it is the code snippet that you gave me to create the custom meta description because that code snippet is also an error –

line 10 : if( ‘product’ !== $post->post_type || ! is_single() ){

the code snippet program that I use to add this is reporting:

[26-Apr-2019 11:53:40 UTC] PHP Notice: Trying to get property of non-object in /home/my site/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(361) : eval()’d code on line 10

The code snippet forum owner says that error is caused by a ‘->’ on line 10.

****Perhaps it could be because when you gave me the original code – I was on php 5.3 and now I am using php7 ?

April 26, 2019
11:21 am
Avatar
Steve Mortiboy
Admin
Forum Posts: 2070
Member Since:
January 5, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

April 26, 2019
11:40 am
Avatar
Deb Harris-Humeniuk
Member
AIOSEOP
Forum Posts: 38
Member Since:
May 1, 2017
sp_UserOfflineSmall Offline

ok thanks – but if you could please clarify –

1.  I am getting one error from your plugin (the 4249), and then the extra code snippet seems also to cause an error ( as shown above). So when the plugin is fixed, it will fix both issues ?

2.  As well I see this from the link you sent that this has been happening since last July 2018 ?  Is there any anticipated fix date ?

3.  I am trying also to track down another error in my error log and would like to know if this could also be related ?  This error started Mar 13 when I updated your plugin (but I also did other updates) I have spent quite a bit of time trying to track these down, so if they are all related – I would like to know so I can stop looking 🙂

[26-Apr-2019 11:14:07 UTC] PHP Warning: Cannot modify header information – headers already sent in /home/mysite/public_html/wp-includes/pluggable.php on line 1251
[26-Apr-2019 11:14:07 UTC] PHP Warning: Cannot modify header information – headers already sent in /home/mysite/public_html/wp-includes/pluggable.php on line 1254

April 26, 2019
3:41 pm
Avatar
Steve Mortiboy
Admin
Forum Posts: 2070
Member Since:
January 5, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

April 26, 2019
5:19 pm
Avatar
Deb Harris-Humeniuk
Member
AIOSEOP
Forum Posts: 38
Member Since:
May 1, 2017
sp_UserOfflineSmall Offline

Thanks

The 4249 error is appearing every 2 – 4 seconds in my error log – its creating a huge file.  Is there any way to disable this ? I am not too familiar with the error log, I am just trying to work thru the errors and fix what I can.

April 26, 2019
5:45 pm
Avatar
Steve Mortiboy
Admin
Forum Posts: 2070
Member Since:
January 5, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

Forum Timezone: America/New_York
Most Users Ever Online: 964
Currently Online:
42
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 35
Members: 21719
Moderators: 0
Admins: 8
Forum Stats:
Groups: 4
Forums: 28
Topics: 2027
Posts: 8767
Newest Members:
Lesley Wells
Administrators: Michael TorbertPeter BayliesSupport TeamSteve MortiboyMatthew RobinsonSteve Klasen, Arnaud: 198Ashish Ravi
[i]
[i]
Skip to toolbar