Unable to reopen registration after close date

Created on 1 June 2023, over 1 year ago
Updated 3 June 2023, over 1 year ago

Problem/Motivation

I'm using commerce registration. We had a close registration date of yesterday and add to cart buttons disappeared. I change the close date to a future date and add to cart buttons are still missing.

Steps to reproduce

Close date passes in the registration field in a product variation. When I move the close date to a future date add to cart buttons do not come back.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

3.0

Component

Registration Core

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jeffgtr
  • Adding a comment here after investigating this on a test site. It appears that once the closed date passes even if you set close to a future date registrations do not re-open and users are not able to register. I would really appreciate a fast answer as the site is live now.

  • I was able to fix this by updating the date in the database "registration_settings_field_data" When you try to edit the close date the change is not reflected in this field. After I set it to a future date all of the add to cart buttons came back.

  • πŸ‡ΊπŸ‡ΈUnited States john.oltman

    Hey @jeffgtr, thanks for the posts and info. I have a local commerce-based test system and editing and saving a future close date after a close date passes works fine for me. I have a couple ideas on what could have happened. First, dates in Drupal are stored using something called the "storage timezone" which is UTC (London). So if you went looking in the database, you may have seen a date different than what you entered since I am assuming you are not based in London. The other thing is if "set and forget" mode is enabled on your system, it would have disabled registration for the settings with close dates in the past when cron ran. Then when you updated the close date, you may not have noticed the "Enable" checkbox was now unchecked - and needed to be checked, in addition to changing the close date, in order to re-enable registration. Eventually, cron ran a second time, and saw the future dates, and re-enabled those. If cron is set to run once per hour, that could explain why things were down for an hour. If you check the Drupal logs you may see some hints at this scenario. Would be interested to know if any of this is plausible. The next time a close date passes in your system, keep the above in mind and see if it makes a difference. If the scenario repeats would be interested in screenshots or files/db dump. Thanks!

  • πŸ‡ΊπŸ‡ΈUnited States john.oltman
  • πŸ‡ΊπŸ‡ΈUnited States john.oltman

    Couple other thoughts:

    * The Registration Settings edit form is very simply with little logic - it doesn't know the close date is in the past or anything like that. So it doesn't seem plausible it would somehow start ignoring your updates.
    * If you have a heavily cached environment with CloudFlare or some other edge cache, those can cache pages for a while for anonymous users, so even if the underlying Drupal page has add to cart buttons, end users who are not logged in may not see them until the CloudFlare cache expires. Something to keep in mind.

  • Set and forget mode was unchecked. I did try changing the timezone hoping I could at least bring registration back temporarily but changed it back to Chicago timezone. I checked the enable and disable buttons, all were enabled. The site isn't heavily cached as it's fairly low traffic but I didn't clear cache through drush, only in the configuration screen, so it could have been a cache issue. I'll keep an eye on it when registration expires.

  • Status changed to Closed: duplicate over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States john.oltman

    This issue is real but is in the Commerce Registration module. Let's pick this up in the issue you opened there.

    https://www.drupal.org/project/commerce_registration/issues/3364303 πŸ› Add to Cart form does not rebuild after settings changes Fixed

Production build 0.71.5 2024