User listing submitted without selecting package

I’m already seeking further support from the dev team on this issue but would like to know if any users have experienced the same thing and managed to fix this issue.

It’s the same issue described in this thread by other users:

https://community.hivepress.io/t/user-listing-submitted-without-selecting-package/4344

https://community.hivepress.io/t/some-users-able-to-list-items-without-purchasing-a-listing-package/3736/2

For me once a new customer has successfully placed an order and then they later come back for a second order - on their second attempt at purchasing they get as far as filling in the add listing form and then when they submit it, the listing is accepted instead of going to the select package page.

I’ve had several instances of this on my live site with real customers now (which is annoying as I have to follow up with a payment link for them to use).

If you have had this and have managed to fix it I’d love to know what you did.

Hi,

Unfortunately, we could not reproduce the issue. Please provide more details regarding this issue (e.g., your actions step by step with screenshots, etc.). This will help us to reproduce and resolve the issue faster.

Hi Andrii,

The issue is now reproducible.

You have an email at your support address with step by step instructions on how to reproduce the issue including a link for you to gain temporary access to my site.

I also included a video showing the issue occurring as I reproduced it.

I sent the first email over a week ago, didn’t hear anything back so sent a new email yesterday as the original thread (which has been going since April of this year) had got unwieldy.

Hi,

Sorry for the delay. Our developers will review it in more detail and provide you with feedback.

Thanks Andrii, I look forward to the reply.

This has just happened with a customer again today.

Purchased their first listing successfully four days ago.

They need a second listing published so they logged in today, selected Post Job, filled in the listing form, hit submit and then got the “Listing submitted successfully” message when they should’ve been taken to the Select Package page and the the Payment Page.

Would appreciate a fast response on this as this is happening with every single return customer at the moment - it’s embarrassing having to then ask for payment separately.

Thanks again.

Hi,

Any update on this?

I’ve sent two videos of the same issue happening to you today to assist with troubleshooting.

Hello

I have solution that worked for me.

See this topic:

As I understand you have a package with 1 listing - customer buys 1 listing.

So Customer fill listing, select package, (he has then 1 package), place order and listing is published. So package changes to 0 and disapears.

Problem is:

In Woocommerce status of order is “processing”. You change it to “completed”. After changing order status to “completed” Customer gets one extra package (he has 1 package again on his account).

So when he publish next listing he gets it for free because of this extra package.

==========================================================

What have I done that solved this problem for me:

in file
\plugins\hivepress-paid-listings\includes\components\class-listing-package.php

there is

if ( in_array( $new_status, [ ‘processing’, ‘completed’ ], true ) ) {

Changed to:

if ( in_array( $new_status, [ ‘processing’ ], true ) ) {

( without ‘completed’ - when the order status is changed to “completed” )

I only have instant payments and I always get the “processing” status after a successful payment. When I change the status of the order to “completed” then nothing happens, no additional package for the user is added.

1 Like

@Dominik thanks so much for your reply - this is really helpful.

Your theory makes sense - I’ve tested it again and it happens on the 2nd, 4th, 6th etc purchase each time so I think this is the same issue.

I’ve now updatde the code as per your comment, tested it AND IT WORKS.

I can’t tell you how grateful I am for this - I’ve spent countless hours going back and forth with HivePress support, talking to Woocommerce support, turning on and off plug-ins one at a time, listing jobs over and over again to test it, adjusting my caching settings and on and on. The worst part has been having to chase customers for payment.

I have two more questions if you’d be kind enough to help out:

  • What happens when HivePress update this plugin without correcting this code? Will I need to adjust the code back again?

  • I have a number of customers who have purchased once from me already - by adjusting this code will it fix the issue for them when they come back for their second purchase or will they still receive the free package?

Again, thank you so much, I really appreciate it.

I’ve marked the solution and raised a separate bug report in the forum so that HivePress can provide a permanent fix to this.

I’m glad I helped you.

I also spent a lot of time trying to figure out what was wrong.

  • Yes, when you install a “Paid Listings” plugin update that is not corrected by Hivepress, you will have to manually re-apply the correction.

  • I use a plug-in for data management: “Database Management tool - Adminer”.

In Hivepress Listing->Package find “ID No” of your Hivepress Package e.g. “1234” (in page url /post.php?post=…)

In Adminer, open the database “…_comments” → show data
Search for ID No of your Package e.g. “1234”.

You will see a list of Users who have this package on their account.

The “comment_karma” field shows the number of remaining listings to be used by the user.

In my opinion, you can delete these records, but test it to be sure. You will then remove the packages for these users from their account and in the next listing they will have to select a new package when ordering.

However, you should not delete records for free packages (not related to Woocommerce), because they are not deleted after use, but are given the value “0”, which prevents them from being selected again after use.

This plugin can also be used to check who started entering the listing but did not complete it.

In Adminer, open the database “…_posts” → show data
Search for “auto-draft”. (Listings are the ones with post_type = hp_listing)

You already have paying customers, that’s great! When did you launch your website? Do you only have paid listings or did you have free listings at the beginning?

Really useful again thank you. Hopefully this thread saves anyone else spending lots of time trying to fix it until HivePress correct it.

  1. I can see the last time the Paid Listings plugin was update was 5 months ago - I’m going to turn off auto updates for it so I get the opportunity to update it and then immediately change the code back.

  2. When I originally raised this with HivePress as part of the troubleshooting @yevhen noticed my existing vendors had “more than one submission limit” and then gave me the following php snippet to reset these vendors values to zero. Unfortunately the root cause you have spotted was not picked up at the same time.

I’ve used this method in place of your suggested delete the records process.

Here’s the php for anyone else needing to do the same:

add_action(
	'template_redirect',
	function(){
		$packages = \HivePress\Models\User_Listing_Package::query()->filter(
			[
				'user__in' => [337, 349, 354, 360, 445, 471, 406],
				'package' => 2440,
			]
		)->get();
		
		foreach($packages as $package){
			$package->set_submit_limit(0)->save_submit_limit();
		}
	},
	1000
);

The ‘package’ code can be found using the process @Dominik has described above. Once you’ve found the list of users against each package code you can add them to the snippet next to ‘user_in’ as well and run it. You’ll then see the values in comment_karma reset to zero.

Given this issue is caused by the way the code has been constructed and isn’t the result of a plug in conflict I assume everyone on HivePress selling 1 listing against 1 package will be impacted by it? I’m amazed not more people have been commenting on it - it’s a massive flaw.

And lastly, yes I’m lucky enough to have paying customers. :grin: I launched the site in October of last year. I went live with only paid listings but back filled jobs myself to build up an audience. I got my first paying customer in December and it’s grown from there.
I recently introduced a free package as well so that smaller companies get the opportunity to use my site as well - I delay their postings my 3 days and they only get a week of being live. Seems to work quite well.

How is your site doing?

Hi. I also think that the problem affects many users and it is worth fixing it permanently.

I launched my website in June. I have business listings for companies. For now, I have a promotion for all listings for free and I’m slowly gaining customers, so it’s OK.

Good luck,
Dominik

Strange that there’s been no response from HivePress on this one - nothing here, nothing in my bug report and I’ve not had a response to my support emails on this subject for nearly two week snow. They’ve got the replication steps and the fix (thanks to you), you’d think it would be an easy one to solve for them.

Well done on your site though - having people visiting the site and signing up to it already is a great result. Keep up the good work :grin:

I’m very sorry for the late reply, this is a complex bug to test and reproduce, so we had to postpone it while finishing custom projects (we’ve paused custom work for now). If the WP access and details you sent via email is still active we’ll test this. There’s a known issue with no package selection when the listing is renewed, but no known bugs with the regular listing submission process yet.

@ihor this is the same issue as described in my bug report in this thread: Changing order status to complete gives user an extra listing for free - #8 by Laconicsky

You’ve just confirmed in that thread that the bug exists and you’ll be fixing it.

The issue and reproduction steps are exactly the same.

EDIT - there’s no point using my WP admin access to try and reproduce this either as I have the workaround described in this thread active.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.