Hi I was trying to update the latest version von Affiliates Pro and it didn’t work with the updater ( i have a valid key) and it also does not work manually. I am getting this message: Updating the Affiliates core FAILED.
My website is www.kawaii.com
Norman Wankowski
Please help.
Problem about updating Affiliates Pro
Posted in Affiliates Pro
I see.
Everything seems to be right, so your case requires further investigation.
I’ll look into it and let you know
Thanks for the feedback.
It shows a result with value: 2.11.0 (autoload yes)
I am running the Pro version.
Hi Michelle,
Since you can’t provide access to your live site, is it possible to grant us access to a staging/testing installation of your site? That way it will be safe for you and easier to us to inspect your issue more accurately.
Thanks
I see.
So, if you run this sql query
SELECT * FROM wp_options WHERE option_name ='affiliates_pro_plugin_version'
what is the result you get? Of course, i suppose that you replace wp_ with your installations table prefix.
Which Affiliate plugin do you use, Pro or Enterprise?
Thanks
Hi George,
It executed normally. I tried deactivating and reactivating the plugin as well as clearing caches at every step.
Try deactivating and then reactivating the plugin.
Did the query i suggested, execute normally or did you get any sql errors?
Thanks
Hi George,
Thank you. I already tried this, but it did not work for me. I am still seeing the “Updating the Affiliates core FAILED.” error message as well as the errors in the log.
Hi Michelle,
Thank you for posting your debug.log contents.
The solution for your issue is the one i’ve mentioned before, now we are certain about it.
I’m posting again for your convenience.
Please read the following instructions carefully before proceeding.
If you are not familiar with phpMyAdmin or you are in doubt, please let me know before you proceed.
Most important before doing so, is to take a backup of your site and the database, in case something goes wrong.
Once you are logged into your phpMyAdmin, you can click on your site’s database on the left column in order to select it.
After selecting your site’s database, click on the button named SQL, which is located on the top menu. It is usually the third button, after Browse and Structure buttons.
After clicking on the SQL button, use the query below to modify the options table.
Important notice: if your table prefix is not the default wp_, you should put your own prefix which can be easily found in wp-config.php file next to $table_prefix.
For example, if in your wp-config.php file it says $table_prefix = ‘wp_’;
The query is
DELETE FROM wp_options WHERE option_name =’affiliates_pro_plugin_version’;
If the $table_prefix = ‘nr_’; then the right query for you should be
DELETE FROM nr_options WHERE option_name =’affiliates_pro_plugin_version’;
Again, make sure that you make a full backup of your site and database and if you are in doubt or if you are not familiar with these tools or any of the steps described above, please let me know.
Kind regards,
George
Hi George,
This is the error I’m getting:
[13-Aug-2015 17:11:53 UTC] WordPress database error Duplicate column name ‘campaign_id’ for query ALTER TABLE wp_arib_aff_hits
ADD COLUMN campaign_id BIGINT(20) UNSIGNED DEFAULT NULL,
ADD INDEX aff_hits_acm (affiliate_id, campaign_id); made by require_once(‘wp-admin/admin.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, affiliates_version_check, affiliates_update, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
[13-Aug-2015 17:11:53 UTC] WordPress database error Duplicate column name ‘campaign_id’ for query ALTER TABLE wp_arib_aff_referrals
ADD COLUMN campaign_id BIGINT(20) UNSIGNED DEFAULT NULL,
ADD INDEX aff_referrals_ac (affiliate_id, campaign_id),
ADD INDEX aff_referrals_c (campaign_id); made by require_once(‘wp-admin/admin.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, affiliates_version_check, affiliates_update, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
[13-Aug-2015 17:11:53 UTC] WordPress database error Duplicate column name ‘campaign_id’ for query ALTER TABLE wp_arib_aff_hits
ADD COLUMN campaign_id BIGINT(20) UNSIGNED DEFAULT NULL,
ADD INDEX aff_hits_acm (affiliate_id, campaign_id); made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, affiliates_version_check, affiliates_update, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
[13-Aug-2015 17:11:53 UTC] WordPress database error Duplicate column name ‘campaign_id’ for query ALTER TABLE wp_arib_aff_referrals
ADD COLUMN campaign_id BIGINT(20) UNSIGNED DEFAULT NULL,
ADD INDEX aff_referrals_ac (affiliate_id, campaign_id),
ADD INDEX aff_referrals_c (campaign_id); made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, affiliates_version_check, affiliates_update, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
Hi George,
Perfect! Thank you! I will try to fix the debug log as soon as I can. 🙂
I’m sorry – I’m doing a million other things and I sincerely dislike going through the trouble or giving admin access to fix a known bug (this is definitely not the only post about the issue I’ve seen).
Does the error message actually mean anything? Is the plugin broken at the moment?
The plugin is working normally. The only problem is with a check between version numbers which is causing this message to appear.
I agree with you that it is difficult to offer admin access on a live/production site, that’s the reason i first asked for the output of debug.log file.
The solution i proposed to Norman is pretty specific, it’s a modification on the database. With the output of debug.log we can inspect the situation better, for example, there might be another plugin conflicting with affiliates plugin.
So, when you manage to enable debugging the way i described on my previous comments, we will be certain on what solution to propose.
It might be the same solution proposed to Norman, but in such cases we have to be certain.
Kind regards,
George
Hi George,
Do you know when this next version will be released?
Sorry no, but as soon as a version is ready, it is released.
In the meantime try once more to enable debugging on your site, if you don’t manage it, please provide us admin access the way i described in my previous comment.
Thanks
Cool man. Awesome support . U r the best !!!
Please close this ticket !
Thanks Norman, that’s very kind of you.:)
BTW, i will delete the comment of yours where you give your db’s name, for your own safety.
That’s great Norman!
This bug has already been added and the fix will definitely be added in the next version.
Thank you once more for finding this bug.
George.
I just deactivated and activated the plugin, and now it looks good.
The: Updating the Affiliates core FAILED. message is also gone.
I looked back in the debug file and it doesn’t show any affiliate errors anymore !
I only hope this will not happen again on the next update . or did we solved the problem now for the future.
Thanks for the big help.
Hope that you have a typo in your comment and didn’t actually delete the table but only a record of it.
It might refer to a query for affiliates_hits table but in order for this query to be executed, the version check should be true.
Anyway, the point is that the issue still persists so i will check it again and let you know
Thanks for your feedback.
Ok George, I did that and it deleted that table successfully ! But this doesn’t solve my problem.
The problem is in the u5sbqr_aff_hits
database error Duplicate column name ‘campaign_id’ for query ALTER TABLE
My backend also still shows: Updating the Affiliates core FAILED.
See the new debug log:
02-Aug-2015 22:28:59 UTC] PHP Notice: Undefined variable: fbcj_members_extension_check in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/buddypress-social-icons/buddypress-social-icons.php on line 11
[02-Aug-2015 22:28:59 UTC] PHP Notice: Undefined variable: fbcj_group_extension_check in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/buddypress-social-icons/buddypress-social-icons.php on line 28
[02-Aug-2015 22:28:59 UTC] PHP Strict Standards: Declaration of myCRED_Notifications::after_general_settings() should be compatible with myCRED_Module::after_general_settings($mycred) in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/mycred-notice-plus/mycred-notice-plus.php on line 203
[02-Aug-2015 22:29:00 UTC] PHP Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-includes/functions.php on line 3560
[02-Aug-2015 22:29:00 UTC] PHP Notice: Undefined variable: fbcj_members_extension_check in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/buddypress-social-icons/buddypress-social-icons.php on line 11
[02-Aug-2015 22:29:00 UTC] PHP Notice: Undefined variable: fbcj_group_extension_check in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/buddypress-social-icons/buddypress-social-icons.php on line 28
[02-Aug-2015 22:29:00 UTC] WordPress database error Duplicate column name ‘campaign_id’ for query ALTER TABLE u5sbqr_aff_hits
ADD COLUMN campaign_id BIGINT(20) UNSIGNED DEFAULT NULL,
ADD INDEX aff_hits_acm (affiliate_id, campaign_id); made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, affiliates_version_check, affiliates_update
[02-Aug-2015 22:29:00 UTC] WordPress database error Duplicate column name ‘campaign_id’ for query ALTER TABLE u5sbqr_aff_referrals
ADD COLUMN campaign_id BIGINT(20) UNSIGNED DEFAULT NULL,
ADD INDEX aff_referrals_ac (affiliate_id, campaign_id),
ADD INDEX aff_referrals_c (campaign_id); made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, affiliates_version_check, affiliates_update
[02-Aug-2015 22:29:00 UTC] PHP Strict Standards: Declaration of myCRED_Notifications::after_general_settings() should be compatible with myCRED_Module::after_general_settings($mycred) in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/mycred-notice-plus/mycred-notice-plus.php on line 203
[02-Aug-2015 22:29:00 UTC] PHP Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-includes/functions.php on line 3560
If you have at $table_prefix=’u5sbqr_’ then yes that is the query.
So in: Run SQL Query
I run:
DELETE FROM u5sbqr_options WHERE option_name =’affiliates_pro_plugin_version’;
Yes you can use that plugin. I tried it myself and it does the job.
Please make sure you use the right table prefix.
It is called: WP-DBManager
by Lester Chan
https://de.wordpress.org/plugins/wp-dbmanager/
Which is the plugin? I will try it myself in my test installation to make sure it works.
I also made a Database Backup right now.
I also have a DATABASE Plugin installed in my wordpress backend, which allows RUN SQL Query,
I never used it, but there is a window that says:
Seperate Multiple Queries With A New Line
Use Only INSERT, UPDATE, REPLACE, DELETE, CREATE and ALTER statements.
Hi Norman,
The solution below applies only to Norman and NOT Michelle.
Norman, you can safely disable debugging by setting WP_DEBUG and WP_DEBUG_LOG both to false.
In order to fix the error causing the error message, you should execute an SQL query to the database in phpMyAdmin.
Please read the following instructions carefully before proceeding.
If you are not familiar with phpMyAdmin or you are in doubt, please let me know before you proceed.
Most important before doing so, is to take a backup of your site and the database, in case something goes wrong.
Once you are logged into your phpMyAdmin, you can click on your site’s database on the left column in order to select it.
After selecting your site’s database, click on the button named SQL, which is located on the top menu. It is usually the third button, after Browse and Structure buttons.
After clicking on the SQL button, use the query below to modify the options table.
Important notice: if your table prefix is not the default wp_, you should put your own prefix which can be easily found in wp-config.php file next to $table_prefix.
For example, if in your wp-config.php file it says $table_prefix = ‘wp_’;
The query is
DELETE FROM wp_options WHERE option_name ='affiliates_pro_plugin_version';
If the $table_prefix = ‘nr_’; then the right query for you should be
DELETE FROM nr_options WHERE option_name ='affiliates_pro_plugin_version';
Again, make sure that you make a full backup of your site and database and if you are in doubt or if you are not familiar with these tools or any of the steps described above, please let me know.
Kind regards,
George
I am subscribing to this topic because I am having the same issue, but debugging isn’t currently working for me.
Hi Michelle,
In order to inspect your situation properly, please send your admin credentials to support at itthinx dot com and don’t forget to mention in the email your username and a link to this topic.
Kind regards,
George
Thanks Norman, we will have a look straight away!
@George, thanks George, please see the debug.log file here:
http://pastebin.com/R5cKaRve
Hi Norman,
Is there anything logged in the debug.log when you tried to update?
If debugging is not enabled, you can add these lines in your wp-config.php file
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
and also create a file called debug.log inside your wp-content folder.
You can always share the contents of debug.log file in pastebin and reply the share link here.
Kind regards,
George