Thread Starter
jomo
(@jonathanmoorebcsorg)
it doesn’t look like save_listing() is designed to cope with free listings, inasmuch as it is requiring a valid payment object to continue…
$this->listing->set_status( 'pending_payment' );
$payment = $this->listing->generate_or_retrieve_payment();
if ( ! $payment )
die();
$payment->context = is_admin() ? 'admin-submit' : 'submit';
$payment->save();
Thread Starter
jomo
(@jonathanmoorebcsorg)
I think the errors were partly due to a database refresh and the database upgrade not being run.
Resolved by rolling back and re-upgrading
Thread Starter
jomo
(@jonathanmoorebcsorg)
for example, if doing a data restore from live to live copy for upgrade testing, I do NOT copy the wp_options table since this can causes a lot of problems copying live settings to non-live environment. Therefore the options table is left updated with the new settings and not caught by test like:
// Post-install migrations.
if ( get_option( ‘wpbdp-migrate-18_0-featured-pending’, false ) ) {
Hi @jonathanmoorebcsorg,
Sorry that you ran into issues here!
I’m not clear on a lot of things so let’s start with some basics:
Can you tell me a bit more?
– What version of WP are you running here?
– What exact version of BD? (number, please)
– What did you do to submit the listing? (Admin side, user side?)
– Who were you logged in when you submitted the listing?
We haven’t had a report of that specific issue yet, so it would help to understand how this happened first…
Thread Starter
jomo
(@jonathanmoorebcsorg)
Hi, I set this thread to resolved myself, as it was due to my test setup, testing upgrade from 4.1.15 to 5.0.4.
I believe the issue can occur in several ways, for example:
- Upgrade to BD 5.0.4
- Update test data by refreshing all tables – except wp_options
- Database upgrade script is not run as the setting is still there in wp_options
This also applies when performing rollback to previous BD version and upgrading again.
This is particular to the refresh method so can be ignored.
Though I do highly recommend never to include wp_options in refresh scripts as it’s too dangerous – at some point there will be an oversight and the test system will accidentally email live customers / republish information from test system etc etc. Probably automatically by cron before anyone has time to do anything about it.
Hi Jon,
Yes, we found a bug in 5.0.4 that did not run all upgrades and wait until they completed. This is fixed in 5.0.5, now publicly released.