There should be a way to create recurring events to happen every X seconds/minutes/hours. In this circumstance we may need a buffer time (between events) and some way of specifying a time range each day - to accommodate open/close times, although this could be based upon the min and max time setting.

CommentFileSizeAuthor
#56 recurring_events-daily_consecutive_recur_types-3088915-56.patch134.34 KBowenbush
#55 recurring_events-daily_consecutive_recur_types-3088915-55.patch134.77 KBowenbush
#55 interdiff-49-55.txt3.28 KBowenbush
#51 radios-above.png47.78 KBmrpauldriver
#51 radios-below.png60.47 KBmrpauldriver
#49 recurring_events-daily_consecutive_recur_types-3088915-49.patch132.08 KBowenbush
#49 interdiff-39-49.txt5.25 KBowenbush
#48 Screen Shot 2019-11-10 at 1.21.46 PM.png121.07 KBowenbush
#46 screenshot-stm5dc3d05a57ff2-eeylbwwcesjkr7nyhpkmutoupuup35ld.tugboat.qa-2019.11.07-08_20_07.png198.25 KBmrpauldriver
#45 Screen Shot 2019-11-06 at 1.12.12 PM.png53.84 KBowenbush
#40 FAMOUS KING OWEN.png1.65 MBthe_glitch
#39 recurring_events-daily_consecutive_recur_types-3088915-39.patch127.36 KBowenbush
#39 interdiff-24-39.txt3.32 KBowenbush
#34 Screen Shot 2019-10-30 at 5.36.05 pm.png222.57 KBthe_glitch
#30 Screen Shot 2019-10-30 at 7.11.16 am.png85 KBthe_glitch
#25 new-series.png51.61 KBmrpauldriver
#25 existing-series.png142.23 KBmrpauldriver
#24 interdiff-16-24.txt838 bytesowenbush
#24 recurring_events-daily_consecutive_recur_types-3088915-24.patch127.09 KBowenbush
#17 recurring_events-daily_consecutive_recur_types-3088915-16.patch126.89 KBowenbush
#17 interdiff-6-16.txt15.36 KBowenbush
#14 screenshot-drupal8test_81-2019.10.27-12_07_22.png132.43 KBmrpauldriver
#14 screenshot-drupal8test_81-2019.10.27-12_05_48.png113.5 KBmrpauldriver
#6 interdiff-3-6.txt585 bytesowenbush
#6 recurring_events-daily_consecutive_recur_types-3088915-6.patch118.93 KBowenbush
#3 recurring_events-daily_consecutive_recur_types-3088915-2.patch118.88 KBowenbush

Comments

owenbush created an issue. See original summary.

owenbush’s picture

Status: Active » Needs review
StatusFileSize
new118.88 KB

Attached is a patch to introduce the following different types of recurrence:

Daily - so you do not have to select every day of the week in a weekly event
Consecutive - so you can create events every X seconds/minutes/hours with a buffer of Y seconds/minutes/hours

This patch also allows for other users to create their own recur types so long as their FieldType classes implement the new RecurringEventsFieldTypeInterface.

This patch also allows for administrators to choose which recur types are enabled to give them flexbility to enable/disable ones which are suitable to their user base.

Several new hooks have been added too
- hook_recurring_events_units_alter to allow a user to alter what units (seconds, minutes, hours) are available.
- hook_recurring_events_recur_field_types to allow a user to alter which recur field types (consecutive, daily, weekly, monthly, custom) are available

This patch comes with 2 hook updates needed to bring an existing installation up to date:

8002 - Converts existing series to use the new recur type values (weekly -> weekly_recurring_date, monthly -> monthly_recurring_date)
8003 - Adds some config to enable all the recur types, and adds the new daily and consecutive recur type base fields.

Adding technotim2010 to the credits for surfacing this need and helping construct the idea.

This is ready for testing...

owenbush’s picture

Crediting mrpauldriver too

owenbush’s picture

StatusFileSize
new118.93 KB
new585 bytes

Patch updated to ensure on fresh install that the config is configured to enable all recur types.

Interdiff provided

mrpauldriver’s picture

I will patch development version: 8.x-1.x-dev updated 18 Oct 2019 at 22:23 UTC

mrpauldriver’s picture

I'll list my findings in separate posts to this issue.

mrpauldriver’s picture

BUG/FEATURE: On my first test I overlooked the duration default setting (in seconds) and ended up with an Internal Server Error after 1801 x 1 second consecutive instances had been created. I'm guessing this is a hard limit, a memory thing or a timeout. Whatever it was, wasn't helpful as it resulted in WSOD.

With the potential for unlimited recurrences in a series, all of which have to be generated, this will likely cause problems. So how about capping the number of consecutive instances with a hard limit?

Assuming the most likely use case of event bookings.
- 1440 (1 minute slots in a day) But why would anybody want this?
- 1024 (hinting at a technical limitation)
- 100 (small round number)
- 1000 (big round number)
- 288 (5 minute slots in a day) But why?
- 168 (hours in a week) But why?

Alternatively, generate a fixed number and then add to this incrementally via a batch process. But this sounds like over-engineered development for the sake of it

I like the round number idea. It is clear and unambiguous.

Until that is, until someone comes along, thinking this would make a neat appointments system linked to office hours. But that's another issue.

mrpauldriver’s picture

UI: Event buffer should have a default value of zero. It is easy to ignore if a buffer is not required and causes a form validation error if not completed.

mrpauldriver’s picture

TASK: The form validation message "This value should be of the correct primitive type." is somewhat cryptic. This needs humanizing.

mrpauldriver’s picture

DISCUSS: Further to #9. Unless we are saying that a recurring event is something other than a thing that people would observe, attend or participate in. I'm not sure that having event durations in seconds is a good idea. What might be the use case for this?

What is the smallest granularity for an event for which people might want to register for? For my use case (school parent evening) this would be five minutes or more.

Others might have different ideas. A one minute speed date perhaps?

mrpauldriver’s picture

BUG: Consecutive and Daily date settings are not preserved when editing a series.

Steps to reproduce.
1. Create a series
2. Edit the series
3. The date inputs are blank
4. Attempting to re-save results in WSOD

mrpauldriver’s picture

BUG: An invalid form validation error occurs (for the consecutive recur type) when saving an event using a different recur type.

I am guessing the consecutive event form inputs are not disabled when a different recur type is selected

Steps to reproduce.
1. Enable Consecutive Event Recur Field Types and at least one other
2. Create an event using one of the other recur types
3. Save the event
4. Form validation occurs, but not for the currently selected recur type
5. The error belongs to the unselected consecutive event recur type

Screenshots attached. Please note, my UI is customised with field groups and tabs.

mrpauldriver’s picture

Overall this looks very promising. Thank you for working on this Owen.

owenbush’s picture

Hey Paul,

I'm taking a look at these issues for you now.

Adding a default value for duration, duration units, buffer, and buffer units is simple and will be addressed today.

I've so far been unable to reproduce the issue with Consecutive and Daily settings not being preserved when editing, nor the issue with failing validation when using a different recur type.

Can I ask - did you run database updates after you patched the module and clear all caches? I'm presuming you did, but just wanted to check.

I'm going to spend some time pondering the issue with memory limits and trying to create a lot of events. The reason I added 'seconds' is that I felt that there may be a use-case that I'm not thinking of, or aware of. And it makes sense to add that functionality in now when I added in minutes and hours, rather than having to shoe-horn it in later. But you're right, if some non-sensible values are added to the form, then it will be easy to run into memory issues. Creating the events in batch is a nice idea as you say, but does seem a bit much. I'm tempted rather than forcing the lower limits, to add validation that says something like "By setting such a low value you may run into memory issues". If someone wants to create an event every single second of every day for a month, great - they'll just have to increase their PHP memory limit to a point where that is feasible.

owenbush’s picture

StatusFileSize
new15.36 KB
new126.89 KB

Attached is a patch (and interdiff) that allows site admins to enable (or disable) an event instance threshold warning. Meaning that if more than X (threshold_count) event instances are going to be created you can show a warning in the widget. Additionally, you can also specify whether exceeding that threshold will prevent event creation altogether. These are configured in the event series setting. There are 4 new config items:

  1. threshold_warning: 'Show a warning when too many event instances are being created'
  2. threshold_count: 'The number of event instances to trigger the warning'
  3. threshold_message: 'The warning to show when too many instances are being created'
  4. threshold_prevent_save: 'Prevent saving a series if too many instances are being created'

A database update will be required to add the default config values.

the_glitch’s picture

Applied patch and got this error on page /events/add

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Component\Plugin\Exception\PluginNotFoundException</em>: The &quot;eventseries&quot; entity type does not exist. in <em class="placeholder">Drupal\Core\Entity\EntityTypeManager-&gt;getDefinition()</em> (line <em class="placeholder">150</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/EntityTypeManager.php</em>). <pre class="backtrace">Drupal\Core\Entity\EntityTypeManager-&gt;getHandler(&#039;eventseries&#039;, &#039;access&#039;) (Line: 264)
Drupal\Core\Entity\EntityTypeManager-&gt;getAccessControlHandler(&#039;eventseries&#039;) (Line: 82)
Drupal\Core\Entity\EntityCreateAccessCheck-&gt;access(Object, Object, Object)
call_user_func_array(Array, Array) (Line: 159)
Drupal\Core\Access\AccessManager-&gt;performCheck(&#039;access_check.entity_create&#039;, Object) (Line: 135)
Drupal\Core\Access\AccessManager-&gt;check(Object, Object, Object, 1) (Line: 112)
Drupal\Core\Access\AccessManager-&gt;checkRequest(Object, Object, 1) (Line: 109)
Drupal\Core\Routing\AccessAwareRouter-&gt;checkAccess(Object) (Line: 94)
Drupal\Core\Routing\AccessAwareRouter-&gt;matchRequest(Object) (Line: 113)
Symfony\Component\HttpKernel\EventListener\RouterListener-&gt;onKernelRequest(Object, &#039;kernel.request&#039;, Object)
call_user_func(Array, Object, &#039;kernel.request&#039;, Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher-&gt;dispatch(&#039;kernel.request&#039;, Object) (Line: 127)
Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache-&gt;pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel-&gt;handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel-&gt;handle(Object) (Line: 19)
</pre>
mrpauldriver’s picture

Ref #16. Ah. No I hadn't updated. Silly of me.

After doing so, problem at #13 is solved.

Problem at #14 persists and I have narrowed this down to consecutive event recur types's duration and buffer not being populated. This probably should not happen, but I expect default values for these two inputs would negate it.

I'll move on the the next patch now.

BTW. I'm not up to speed with interfdiffs and having read the help page, I'm not sure whether I can apply this on top on the existing patch or whether to remove the old one and apply the new. In the meantime I'll experiment, but it would help me if you could clarify this gap in my understanding. Actually this just one of many gaps in my understanding;-)

----
Edit: I just re-read the help page again and the passage below clarifies the correct usage.

What am I supposed to do with another user's interdiff?
Nothing, other than read it. Interdiffs are for developers and reviewers working on a patch, not for sitebuilders using the patches. They help to easily see the differences between two versions of a patch.

mrpauldriver’s picture

@the_glitch The second patch applied cleanly for me. I did remove the first patch beforehand.

Default settings for duration and buffer work well and fix the bug mention at #14.

The event threshold works nicely, but I found it slightly confusing. I got the impression that I could have a warning with the option to continue, but this was not the case and it me proceed without seeing a warning. Server error follows. Is this a bug or working as designed?

Threshold Prevent Save checkbox works well. Would this be better if enabled by default?

Body field is still mandatory.

the_glitch’s picture

@MrPaulDriver I hadn't applied either of the first 2 patches before. Patch #17 is the only one I've tried.

owenbush’s picture

I'll review this all later today, but @the_glitch, your composer has deleted the whole module again. You can see in the error that it says the event series entity type doea not exist. That only happens if the module code has been removed. As usual you'll need to run your composer commands again. As Paul said, this patch should apply, and even if it didn't, that error is not what would happen in the event of a failure.

owenbush’s picture

Glad to hear #13 and #14 are resolved. I'll get to setting the body field as not required - but I may approach that as part of a separate ticket. There is a lot of validation I need to add and I can work that at the same time.

The event threshold works nicely, but I found it slightly confusing. I got the impression that I could have a warning with the option to continue, but this was not the case and it me proceed without seeing a warning. Server error follows. Is this a bug or working as designed?

The threshold warning should (if enabled) just display under the duration/duration units fields (injected via AJAX and with default styling may not be super obvious it is there!), and will display whatever message is entered in the settings. Unless 'prevent save' is enabled it won't prevent saving it is more informational. If prevent save is enabled then when the form is submitted a proper validation error is shown at the top and it will not save the series.

I just tested it - it works if editing an existing series but seems to have stopped working for new series. I'll get that resolved....

owenbush’s picture

StatusFileSize
new127.09 KB
new838 bytes

Attached is an interdiff and patch to address the warning not displaying on add forms.

mrpauldriver’s picture

StatusFileSize
new142.23 KB
new51.61 KB

I've installed patch 24 and confirm that the message is displayed when editing an existing series, but I'm still not seeing this for new event series. Nothing coming in via ajax is observed. Screenshots attached.

When this is working, I think visibility of the message might remain be a problem. In the case of an existing series, I think the message should be duplicated along with the dialogue to confirm date changes, because this is where the the site editor's eye will be drawn

<h2>Confirm Date Changes</h2>
<p>Recurrence configuration has been changed, as a result all instances will be removed and recreated. This action cannot be undone.</p>
<p><strong>Saving this series will create up to 1547 event instances. This could result in memory exhaustion or site instability.</strong><p>
mrpauldriver’s picture

Just reviewing my last post and wondering what would happen to pre-existing registrations in the event of;

Recurrence configuration has been changed, as a result all instances will be removed and recreated. This action cannot be undone.

owenbush’s picture

I've installed patch 24 and confirm that the message is displayed when editing an existing series, but I'm still not seeing this for new event series. Nothing coming in via ajax is observed. Screenshots attached.

I had to clear caches locally for this change to take effect. Can you confirm if you did that after applying the patch? If so, then I may need to look at this again.

When this is working, I think visibility of the message might remain be a problem. In the case of an existing series, I think the message should be duplicated along with the dialogue to confirm date changes, because this is where the the site editor's eye will be drawn

I agree putting it in the confirm date changes section is a good idea. Visibility is a concern for me too, I applied an 'error' class to the message in hope that whatever admin theme is in use would hopefully have some error styles in place. I want to stray away from being too verbose or opinionated as far as theming goes as it might not work well with all themes. Equally I want to ensure the content editor is seeing what they need to see, so I'll explore what other options I have here.

Just reviewing my last post and wondering what would happen to pre-existing registrations in the event of;

Recurrence configuration has been changed, as a result all instances will be removed and recreated. This action cannot be undone.

In this circumstance, all event instances in that series, and their registrations are wiped out. Registrants should be emailed with a cancellation notice as this happens. The underlying hope is that event series dont get updated after-the-fact. Once there are registrations etc, any changes needed are applied to the instances themselves, not the whole series. This is pretty fundamental to how everything fits together, because as instances are created by the creation/saving of an event series it is hard to determine whether the instance a registrant has registered for 1) exists at all anymore, 2) is at a different time as so they may no longer be able to go.

Updating date recurrence is a destructive process as mapping existing instances to new ones is extremely difficult.

the_glitch’s picture

@owen yes i realised composer had deleted the module again so I ran require again then got a different error on /events/add
This error also happens with patch #24.

The website encountered an unexpected error. Please try again later.
TypeError: Argument 5 passed to Drupal\recurring_events\EventCreationService::__construct() must be an instance of Drupal\Core\Field\FieldTypePluginManager, instance of Drupal\Core\Datetime\DateFormatter given, called in /Users/darrenmoves/Sites/My Suite/core/lib/Drupal/Component/DependencyInjection/Container.php on line 285 in Drupal\recurring_events\EventCreationService->__construct() (line 79 of modules/contrib/recurring_events/src/EventCreationService.php).
Drupal\recurring_events\EventCreationService->__construct(Object, Object, Object, Object, Object) (Line: 285)
Drupal\Component\DependencyInjection\Container->createService(Array, 'recurring_events.event_creation_service') (Line: 173)
Drupal\Component\DependencyInjection\Container->get('recurring_events.event_creation_service') (Line: 77)
Drupal\recurring_events\Form\EventSeriesForm::create(Object) (Line: 28)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('Drupal\recurring_events\Form\EventSeriesForm') (Line: 226)
Drupal\Core\Entity\EntityTypeManager->getFormObject('eventseries', 'add') (Line: 82)
Drupal\Core\Entity\HtmlEntityFormController->getFormObject(Object, 'eventseries.add.default') (Line: 78)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
owenbush’s picture

@the_glitch: the definition of the EventCreationService has changed and needs a full cache flush in order to work after patching.

the_glitch’s picture

I flushed caches and the error is fixed but now the 'Recur Type' field has disappeared.
screenshot

owenbush’s picture

Looks like you haven't run database updates, can you run those, clear the cache and then report back?

the_glitch’s picture

I ran drush updb then drush cr and it's still the same. No 'Recur Type' field.
Terminal is saying: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "weekly" plugin does not exist. Valid [error]

the_glitch’s picture

Patch #24 applied after having to delete the all series nodes that were causing a 'Weekly' plugin error when drush updb.

Now 'Inline Entity Form - Complex' fields in Event Series don't work.

the_glitch’s picture

StatusFileSize
new222.57 KB

Patch #24 applied after having to delete the all series nodes that were causing a 'Weekly" plugin error when drush updb.

All 'Recur Types' are now in the form and functioning but has now created a bug with 'Inline Entity Form - Complex' fields in Event Series causing the IEF-Complex 'Add Existing Node' and 'Add New Node' buttons to not work due to what seems to be an AJAX error each time those buttons are clicked that all says this:
screenshot

"An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /events/add?ajax_form=1
StatusText: 500 Service unavailable (with message)
ResponseText: The website encountered an unexpected error. Please try again later.InvalidArgumentException: The date cannot be created from a format. in Drupal\Component\Datetime\DateTimePlus::createFromFormat() (line 248 of core/lib/Drupal/Component/Datetime/DateTimePlus.php). Drupal\recurring_events\Plugin\Field\FieldType\ConsecutiveRecurringDate::convertFormConfigToArray(Object) (Line: 188)
Drupal\recurring_events\Plugin\Field\FieldWidget\ConsecutiveRecurringDateWidget-&gt;checkDuration(Object) (Line: 110)
Drupal\recurring_events\Plugin\Field\FieldWidget\ConsecutiveRecurringDateWidget-&gt;formElement(Object, 0, Array, Array, Object) (Line: 335)
Drupal\Core\Field\WidgetBase-&gt;formSingleElement(Object, 0, Array, Array, Object) (Line: 202)
Drupal\Core\Field\WidgetBase-&gt;formMultipleElements(Object, Array, Object) (Line: 104)
Drupal\Core\Field\WidgetBase-&gt;form(Object, Array, Object) (Line: 177)
Drupal\Core\Entity\Entity\EntityFormDisplay-&gt;buildForm(Object, Array, Object) (Line: 125)
Drupal\Core\Entity\ContentEntityForm-&gt;form(Array, Object) (Line: 117)
Drupal\Core\Entity\EntityForm-&gt;buildForm(Array, Object) (Line: 119)
Drupal\recurring_events\Form\EventSeriesForm-&gt;buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 519)
Drupal\Core\Form\FormBuilder-&gt;retrieveForm(&#039;eventseries_add_form&#039;, Object) (Line: 369)
Drupal\Core\Form\FormBuilder-&gt;rebuildForm(&#039;eventseries_add_form&#039;, Object, Array) (Line: 626)
Drupal\Core\Form\FormBuilder-&gt;processForm(&#039;eventseries_add_form&#039;, Array, Object) (Line: 319)
Drupal\Core\Form\FormBuilder-&gt;buildForm(Object, Object) (Line: 93)
Drupal\Core\Controller\FormController-&gt;getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer-&gt;executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache-&gt;pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel-&gt;handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel-&gt;handle(Object) (Line: 19)
"
mrpauldriver’s picture

Ref #27. Cache cleared but still not seeing the ajax warning.

the_glitch’s picture

do you have any inline_entity_form fields in Series? If not, install the inline_entity_form module and add an entity reference field and in Manage Form Display use the 'Inline Entity Form - Complex' widget and you'll probably get the same issue.

owenbush’s picture

Let's try and deal with one issue per thread. The IEF problem should be raised as a separate issue so I can review if it is RE's end or not. I'd prefer to deal with just the daily and consecutive recur types here to keep things clear.

the_glitch’s picture

Yeh I wasn't sure if to raise a separate issue or not because the problem only started after applying the patch in this issue.

owenbush’s picture

StatusFileSize
new3.32 KB
new127.36 KB

I found the issue causing the problem with IEF. So attached is an interdiff and another patch.

the_glitch’s picture

StatusFileSize
new1.65 MB

Tested and working with IEF. Thank youtoken

owenbush’s picture

Paul - are you still not seeing the warning via AJAX when setting a consecutive event? I've been unable to recreate that issue locally and would like to get this merge done if it is working as it is a bit of a blocker for other items.

mrpauldriver’s picture

With patch #39 . Still not seeing ajax warning when 'Event Instance Threshold Prevent Save' is not checked.

owenbush’s picture

Paul - have you made any changes to the form layout using field groups or tabs or anything? Or is the form display all as it is out of the box? Thinking about this if any changes were made then the message will likely be appearing somewhere completely random, so I may need to actually attach it to one of the fields to make sure it shows up in the right place.

mrpauldriver’s picture

I did have some field groups on the node form and had similar thoughts myself. After getting rid of them I still don't see the ajax warning. I have also uninstalled, reinstalled.

Please could you post a screenshot of what I should be seeing? Bartik theme.

owenbush’s picture

StatusFileSize
new53.84 KB

Screenshot of ajax warning

Here is a screenshot of what it should look like out of the box with Bartik.

mrpauldriver’s picture

Sorry, it's not present. Nor is it seen for a completely fresh installation on simplytest.me See screenshot attached

Patched with https://www.drupal.org/files/issues/2019-10-30/recurring_events-daily_co...

owenbush’s picture

Looks like I have work to do then. I'll report back when I know more. Thanks for persisting with this.

owenbush’s picture

StatusFileSize
new121.07 KB

Hey Paul

I've done some more testing and even went on simplytest.me like you did and applied patch 39.

Simplytest

I think what may be the issue here is that in order for the check to take place, one of the values of Duration or Duration Units needs to be updated. This wasn't necessarily a problem when there was no default value for duration, but now that it defaults to 5 minutes, I may need to run the validation immediately on page load too. Can you test modifying one of those values to see if you get the message as expected?

owenbush’s picture

StatusFileSize
new5.25 KB
new132.08 KB

Attached is an interdiff between patches 39 and 49. It shows that I've made the error more visible by using the standard `form-item--error-message` class. Not only that, but I've also set the checks to kick in when the start date, end date, start time, and end time fields are modified, not just the duration and duration units fields. I also added the error message to the diff that gets shown at the top of the form when you are updating an existing event.

Hopefully, this will draw more attention to the messages.

Here is a screenshot
Only local images are allowed.

mrpauldriver’s picture

I now see a warning in the date range area when first creating an extended series, and also in the confirmation area when extending an existing series.

Looks good to me.

mrpauldriver’s picture

StatusFileSize
new60.47 KB
new47.78 KB

One small inconsistency. The form order is different for consecutive events with the radios appearing below the date range. With other recurrence types the radios appear above.

Please see screenshots.

mrpauldriver’s picture

Issue summary: View changes

Sorry, Dreditor embeds screenshot in opening post. Must figure out how to avoid that

owenbush’s picture

Hey Paul thanks for all the testing. I really appreciate it.

Were you seeing the field ordering inconsistency in a fresh install like simplytest.me or on an existing site that was patched? I'm going to take a look to see what is going on for you, but the extra info would be much appreciated.

mrpauldriver’s picture

Tested on my patched local, but also seen on simplytest.me

owenbush’s picture

StatusFileSize
new3.28 KB
new134.77 KB

I have modified the patch a little to hopefully fix the issue with ordering of fields. Please let me know if this does not work.

owenbush’s picture

StatusFileSize
new134.34 KB

Bah, I inadvertently added some registration related stuff into the configs which I should not have. Updated the patch.

mrpauldriver’s picture

Status: Needs review » Reviewed & tested by the community

#56 Fixed. Big job, done well. Marking RTBC.

I am now left wondering whether consecutive slots can be plugged into to the other recurrence types? For example; recurring 30min slots, between 9am and 5pm, Monday-Friday. #appointment_system

  • owenbush committed b1a3a7b on 8.x-1.x
    Issue #3088915 by owenbush, MrPaulDriver, the_glitch, TechnoTim2010: Add...
owenbush’s picture

Status: Reviewed & tested by the community » Fixed

Thanks all, especially Paul (good rhymes) for getting this over the finish line. I've merged it into 8.x-1.x-dev.

Paul, plugging the consecutive slots into the other types is probably best placed into a different issue so it can be tracked, if you are interested in that sort of functionality.

Marking as fixed.

mrpauldriver’s picture

I don't think I will be needing the extra functionality, but would not be surprised if others did and I agree it should be another issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.