I'm running into a strange bug when adding a Smart Date recur field onto a Paragraph type. I've created a Paragraph type called "Event Session", and on that Paragraph type I have a single field called "Date" (field_event_date). In the field settings it's set to unlimited cardinality, required, allow recurring date values/12 with a default value of "Next hour" (though I've also set it to None with no effect).
Under manage form display on the Paragraph type I have it set to "Smart Date | Inline range", with these toggled on:
- Always include an empty...
- Hide the end date...
- Provide a checkbox...
- Use an overlay...
- Separator: to
- Use modal for...
- Allowed frequency values: daily, weekly, monthly, annually
I've added this Paragraph type onto a content type called "Event" as a field called "Schedule" (field_schedule), set to unlimited cardinality, and required. The Paragraph form settings under manage form display are the defaults for Paragraphs except I don't have a default so you have to click the "Add" button to add a paragraph to Schedule.
If I go to create an Event node, it will add a paragraph that looks like this:

Even though I haven't yet chosen to repeat (it's set to "never"), it still is showing all the stuff for repeats, and, it has the Advanced details with nothing in it. If I click "Add another item", the second value will look how I expect the first one is supposed to look. (note that I added the recommended module on this one's frontpage for clicking the X to remove a field from a multivalue field, but it was doing this even before I did that)

If, on the first value, I change "never" to "days", "weeks", whatever, nothing changes. Also selecting "After" under "Ends" does nothing, same for "On date". However it will work in the second value. BUT, if I click "X" to delete the first value so that the second value becomes the first, the second value does the same thing as the original first! Hopefully this makes sense. The browser console gives no JavaScript errors.
I've created a short screen recording demonstrating the issue:
Video link because the video element apparently does not work here :)
| Comment | File | Size | Author |
|---|---|---|---|
| Screen Recording 2024-12-02 at 11.42.15 AM.mp4 | 1.4 MB | dalemoore | |
| Screenshot 2024-12-02 at 11.39.08 AM.png | 217.89 KB | dalemoore | |
| Screenshot 2024-12-02 at 11.38.19 AM.png | 156.6 KB | dalemoore |
Comments
Comment #2
dalemoore commentedComment #3
dalemoore commentedComment #4
kle commentedA node points to a paragraph and vice versa. But because of having revisions its not clear which paragraph is the actual one. So its hard to find the corresponding node of a field which is used in a paragraph (or worse in a sub-paragraph). Please have a closer look in the data-structure of your db to get desperate :-)
Comment #5
marco van bemmel commentedSame problem here. I use smart dates in Commerce product variations (for selling courses). When I use more than one variation, the same thing happens to the widget as in your video. The recurring 'number', 'end-date' and the 'byday-checkboxes' get all display:none
I also noticed that the dates in all variations of a product are saved with the same values, even if I change them individually. If I change one variation, all variations of a product get the same dates. Is this also a known issue?
I will try to find a solution.
Comment #6
dalemoore commentedIf you need any help testing let me know! I'm still having the issue, and it's something I'd love to solve. But I'm not a backend guy. :\
Comment #7
jasa commentedI have exactly the same issue. If you create only a unique paragraph with a smart date field it's working, but whenever I try to create a second one, then nothing changes.
I'd love to have a solution.
Thanks in advance!
Comment #8
mandclu commented@jasa it sounds like you're having the opposite problem to the one initially reported. @marco van bemmel I suspect your issue has more to do with the way you have your product variations configured, but I confess it has been a while since I worked on a commerce setup.
As for the originally reported issue, I confess I am struggling to understand what value is being added by the paragraph that you have the Smart Date field within. You need to have sets of sets of dates for each node?
It does seem like a Javascript issue. Are there errors being reported in the console?
Comment #9
jeff.a commentedI'm having similar issues with Paragraphs. If I use any of the Advanced fields (for example, I'm choosing "First Tuesday" with my current node), it empties the dates completely from the node/paragraph after hitting save.
No error or console messages, just seems to delete the dates. However, I get the error below when I click the "Manage Instances button. I'm using all the most recent releases (Drupal 10.6.12, Smart date 4.2.8, Paragraphs 8.x-1.21).
Drupal\Core\Entity\Query\QueryException: Invalid specifier 'rrule' in Drupal\Core\Entity\Query\Sql\Tables->addField() (line 307 of /app/web/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php).
#0 /app/web/core/lib/Drupal/Core/Entity/Query/Sql/Condition.php(58): Drupal\Core\Entity\Query\Sql\Tables->addField('field_harvest_d...', 'INNER', NULL)
#1 /app/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php(193): Drupal\Core\Entity\Query\Sql\Condition->compile(Object(Drupal\mysql\Driver\Database\mysql\Select))
#2 /app/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php(82): Drupal\Core\Entity\Query\Sql\Query->compile()
#3 /app/web/modules/contrib/smart_date/modules/smart_date_recur/src/Entity/SmartDateRule.php(284): Drupal\Core\Entity\Query\Sql\Query->execute()
#4 /app/web/modules/contrib/smart_date/modules/smart_date_recur/src/Controller/Instances.php(111): Drupal\smart_date_recur\Entity\SmartDateRule->getParentEntity()
#5 /app/web/modules/contrib/smart_date/modules/smart_date_recur/src/Controller/Instances.php(496): Drupal\smart_date_recur\Controller\Instances->listInstancesOutput()
#6 [internal function]: Drupal\smart_date_recur\Controller\Instances->listInstances(Object(Drupal\smart_date_recur\Entity\SmartDateRule), false)
#7 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#8 /app/web/core/lib/Drupal/Core/Render/Renderer.php(637): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#10 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#11 /app/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /app/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#13 /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /app/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /app/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(116): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(90): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /app/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /app/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /app/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /app/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#25 {main}
Comment #10
jeff.a commentedI added a fix for all the paragraphs issues I was having here: https://www.drupal.org/project/smart_date/issues/3606260
Not sure if the patch will fix these issues, but I'm curious to know.
Comment #11
mandclu commentedI just merged in the changes in #3606260: Recurring Smart Date fields break in Paragraphs (Invalid specifier 'rrule', UndefinedLinkTemplateException, month limit ignored), which will be included in a coming 4.3.0 release. I'm moving this issue to postponed, as I think it would be worth evaluating if any changes are still needed.