I previously tested and confirmed user sign up, vendor registration and submit listing flow was working as expected. I don’t know exactly when the flow stopped working as expected. I got it working then sort of moved on to other aspects of the site. Upon retesting, I noticed I was unable to add new listings.
Below are my site settings
Settings:
- Allow Direct Vendor Registration
- Allow User Registration
- Added snippet to change listing submit page slug, below
// Change the Add Listing page URL slug (requires refreshing permalinks)
add_filter('hivepress/v1/routes', function($routes) {
$routes['listing_submit_page']['path']='/contractor-registration';
return $routes;
}, 1000);
PREVIOUS FLOW:
- Non-signed in user clicks ‘Submit listing’ button in upper right corner of page
- User needed to click “Don’t have an account yet? Register” link
- User complete user registration form. automatically directed to Vendor registration form.
- Next, user fills out vendor registration form, automatically directed to submit listing form
- Next, user fills out/completes new listing form / listing submit
- Listing requires approval before display
CURRENT FLOW:
- Non-signed in user clicks ‘Submit listing’ button in upper right corner of page
- User needed to click “Don’t have an account yet? Register” link
- User complete user registration form
- User is redirect to homepage. Clicking submit listing link redirects user back to homepage
I’ve attempted to troubleshoot by removing the custom snippet, re-saving permalinks, deactivating plugins, etc.
I’m at a loss for what to troubleshoot next. Something seems to be interfering with the Submit listing process. After creating an user account, instead of proceeding to the Vendor details, I am 302 redirected to the homepage.
I can go to the next step /register-vendor
if I directly enter the slug in the browser URL, but after filling out the details, I am unable to proceed to the submit-listing (or custom slug /contractor-registration) as this 302 redirects me back to the homepage.
It seems the issue is I am unable to submit new listings and instead I am redirect back to homepage.
Do any of the HivePress ExpertHive expert have any ideas what I can troubleshoot to get the expected user signup, registration, submit listing flow re-established?
Note, my error_log contains these logs about the same time I was troubleshooting
[08-Mar-2025 19:57:36 UTC] WordPress database error Table 'optimized_db.optimized_listings' doesn't exist for query INSERT INTO `esqa_posts` (`post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_content_filtered`, `post_title`, `post_excerpt`, `post_status`, `post_type`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_parent`, `menu_order`, `post_mime_type`, `guid`) VALUES (1, '2025-03-08 19:57:36', '0000-00-00 00:00:00', '', '', '', '', 'auto-draft', 'hp_listing', 'closed', 'closed', '', '', '', '', '2025-03-08 19:57:36', '0000-00-00 00:00:00', 0, 0, '', '') made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), apply_filters('template_include'), WP_Hook->apply_filters, HivePress\Components\Router->set_page_template, call_user_func, HivePress\Controllers\Listing->redirect_listing_submit_page, HivePress\Models\Post->save, wp_insert_post