🇨🇦Canada @endless_wander

Account created on 3 December 2009, over 14 years ago
#

Recent comments

🇨🇦Canada endless_wander

When configuring a text_format using patch from #80, I was getting this error:

Warning: Undefined array key "styles" in Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin->buildConfigurationForm() (line 61 of core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ListPlugin.php).

Same as in #91, this is fixed by adding an isset()

New patch added with this fix

🇨🇦Canada endless_wander

New patch based on #80 with isset() added to stop error warning.

🇨🇦Canada endless_wander

Patch from 80 [upstream] Use CKEditor 5's native and UX Needs work is working for me in the editor and saving content, but produces an error message on editing page where CKEditor appears:

Warning: Undefined array key "styles" in Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin->getDynamicPluginConfig() (line 99 of core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ListPlugin.php).
Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin->getDynamicPluginConfig(Array, Object) (Line: 316)
Drupal\ckeditor5\Plugin\CKEditor5PluginManager->getCKEditor5PluginConfig(Object) (Line: 934)
Drupal\ckeditor5\Plugin\Editor\CKEditor5->getJSSettings(Object) (Line: 81)
Drupal\editor\Plugin\EditorManager->getAttachments(Array) (Line: 100)
Drupal\editor\Element->preRenderTextFormat(Array)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 859)
Drupal\Core\Render\Renderer->doCallback('#pre_render', 'element.editor:preRenderTextFormat', Array) (Line: 421)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 240)
Drupal\Core\Render\Renderer->render(Array) (Line: 475)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 89)
__TwigTemplate_ab337cfa89a1457340e8d67a133a7335->doDisplay(Array, Array) (Line: 394)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 367)
Twig\Template->display(Array) (Line: 379)
Twig\Template->render(Array) (Line: 38)
Twig\TemplateWrapper->render(Array) (Line: 39)
twig_render_template('core/themes/claro/templates/form/field-multiple-value-form.html.twig', Array) (Line: 348)
Drupal\Core\Theme\ThemeManager->render('field_multiple_value_form', Array) (Line: 480)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 493)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 493)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 240)
Drupal\Core\Render\Renderer->render(Array) (Line: 475)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 44)
__TwigTemplate_815234656e4a4de144202255a926142d->doDisplay(Array, Array) (Line: 394)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 367)
Twig\Template->display(Array) (Line: 379)
Twig\Template->render(Array) (Line: 38)
Twig\TemplateWrapper->render(Array) (Line: 39)
twig_render_template('core/themes/claro/templates/node-edit-form.html.twig', Array) (Line: 348)
Drupal\Core\Theme\ThemeManager->render('node_edit_form', Array) (Line: 480)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 240)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 239)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->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: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
🇨🇦Canada endless_wander

What camslice describes in #54 happened to me and my client as well. about 30 days of data is gone after the update was made

🇨🇦Canada endless_wander

Thank you for this cool group of plugins. I was encountering a similar issue using just a single instance of CKEditor in combination with the Layout Paragraphs module.

When adding a Paragraph via the Layout Paragraphs interface, CKEditor would not load. Console log gave same error as OP TypeError: null is not an object (evaluating 'this.wordCountWrapper.appendChild')

Using merge request from #10 solves my issue as well.

🇨🇦Canada endless_wander

Patch #25 did not work for me using Layout Paragraphs where a field within a Paragraph has Select 2 enabled for form display.

Patch from #17 works in this scenario for me.

🇨🇦Canada endless_wander

@webberly I tried this out with a regular node using the Conditional Fields module

I set an image field on a custom node content type. I added a checkbox field called "Show Image" to the content type. I used Conditional Fields to set the image field as a dependency on Show Image being checked.

On a normal node creation page, when I check the Show Image field, the image field appears. When unchecked, the image field disappears.

In an inline form, my image field appears no matter whether the Show Image field is checked or unchecked.

This is the same behaviour as with Recurring Events conditional fields. It seems like the problem is with the Inline Entity module not respecting any #states for any content ?

🇨🇦Canada endless_wander

Confirmed. Looks like this when creating content where all the frequency options are visible, for example:

🇨🇦Canada endless_wander

@webberly could you provide a little bit more information about how exactly to reproduce?

🇨🇦Canada endless_wander

@kasperg this isn't working for me. I can set the Scheduler options for my Event Series type and make the fields appear when creating or editing an Event Series. If saving the Event Series with a "Publish on" or "Unpublish on" value, I do not see that value reflected in the EventSeries entity values. There are no "publish_on" or "unpublish_on" values. As a result, re-loading the Event Series editing form shows the "Publish on" and "Unpublish on" fields are blank again. No scheduling occurs. I am using the "default" Event Series type.

To reproduce, install Devel module and check the entity values on the Devel tab after saving an Event Series with scheduler values. You will see that no publish_on or unpublish_on values are stored.

🇨🇦Canada endless_wander

@kasperg this would be a very welcome feature for my client and I would love to help as I can. I will take some time to test your modifications. Let me know if I can do anything else

🇨🇦Canada endless_wander

@owenbush, I can see from my client's perspective they wouldn't want people intentionally or accidentally messing with registrations after an event has passed as they use that info for their event statistics.

I could see them wanting to update registrants when an event is closed, however, as a registrant may contact them directly to say they can't come, etc.

🇨🇦Canada endless_wander

@sandeep_k I'm not sure how else to list the steps:

1. Make a view of Event Series
2. Click to add fields to the view
3. Search for "Registration Type" as a field to add. It does not exist in the list of available fields

🇨🇦Canada endless_wander

Adding a patch that uses the real bundle name for the Registrant type, which for my site is "default." RegistrantListBuilder->getCustomFIelds() will now use all the fields attached to this bundle and the resulting list looks as expected with all custom fields.

Is there actually a way to add different Registrant bundles? /admin/structure/events/registrant/types/add goes nowhere and there is no route for adding Registrant types. (In fact, only EventSeries have such a route for adding new types. Was this a recent change?). Is "default" the only possible bundle name for Registrants, then? Is it thus okay to hardcode "default" as the bundle name within RegistrantListBuilder?

I tried out a clean install on simplytest.me and "default" is the bundle name created when installing the recurring_events_registration submodule.

I would prefer to use Recurring Events Views to power the Registrant lists, but it is not compatible with Series Registration at this time. I have been untangling this today and will post another issue related to that.

For now, I believe it is important that the getCustomFields() method returns custom fields as expected and so I believe this patch will be a fix.

🇨🇦Canada endless_wander

added a patch for myself and my client in the meantime to help identify events that use Series Registration via Views -- https://www.drupal.org/project/recurring_events/issues/3419642#comment-1... 🐛 "Registration Type" field is not available in views Needs review

🇨🇦Canada endless_wander

@trichers, I think you would need to figure out how someone else can reproduce your error. Otherwise, it could be related to some of your custom code or a combination with another module.

🇨🇦Canada endless_wander

have you tried on a clean installation or using simplytest.me to see if it works without other modules involved?

🇨🇦Canada endless_wander

@ohmdesbois I tested on my latest version of recurring_events and was able to create yearly events.

Were there any errors logged by Drupal or appeared in browser console? What exactly occured after you submitted the event-creation form?

Can you reproduce on a clean installation locally or using https://simplytest.me/

🇨🇦Canada endless_wander

I am getting same issue as #14 when upgrading to Drupal 10.2.1. Only solution for me was to uninstall the module for now

🇨🇦Canada endless_wander

Custom templates in my theme are working with no problems. I have them in /templates/content folder of my theme -- e.g., /templates/content/eventinstance.twig.html

You may want to try debugging Twig to see why yours are not registering
- https://drupak.com/blog/enable-debugging-twig-templates-drupal-8
- https://www.drupal.org/docs/develop/theming-drupal/twig-in-drupal/debugg...

🇨🇦Canada endless_wander

@tricher it is great that you are getting use out of this module, but you may not be used to the Drupal issue-reporting system. It is not really a place for individual troubleshooting. You can see this guide for more information -- https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett...

At a minimum, you need to provide all of the steps required to replicate any issue that you have and you should most often do a quick test on a brand new Drupal installation to make sure it is not custom code interfering with something else.

Otherwise, you may have more luck asking these kinds of questions on other support forums like StackExchange -- https://drupal.stackexchange.com/. The Drupal Slack chat group has a dedicated support channel that is great for questions like this -- https://www.drupal.org/community/contributor-guide/reference-information...

🇨🇦Canada endless_wander

@trichers can you provide more detailed information about how to reproduce the issue? Have you tried using simplytest.me with Recurring Events module installed to see if you can reproduce the image from a fresh installation?

🇨🇦Canada endless_wander

Yep, me too, so I am using that for my site. Thought this kind of one would help the community. Happy either way.

🇨🇦Canada endless_wander

For me, it provides assistance to a website where a custom module modifies Webforms depending on their category. For example, I modify the attributes and add tooltips to submit, preview, next, previous buttons in a multi-page Webform. Previously, I could just check the single-value "category" attribute of a Webform, but now I was having to get the array of categories and check for the presence of the category I want. Using new isCategory() method, I am able to standardize this check for whether a Webform belongs to a certain category.

🇨🇦Canada endless_wander

Thank you, +1 for the patch. Fixed same problem I was having with Select2 elements in the Layout Paragraphs modal.

🇨🇦Canada endless_wander

The fix here is incompatible with Drupal 10 as it is missing the now required $query->accessCheck() part of the query. A D10 site will break when the module is updated.

Attached patch will fix for D10 users

🇨🇦Canada endless_wander

In case someone finds this thread with same issue as me, the change to 'categories' instead of 'category' broke some entityQuery instances. So must change any conditions for categories from:

->condition('category', 'Category Name')

to:

->condition('categories.*', 'Category Name')

As a side note, it may be nice to add a `hasCategory()` method to the Webform class as well

🇨🇦Canada endless_wander

@dineshkumarbollu I am using Drupal 9 and will be upgrading to 10 in the coming weeks

When I have time, I will test from scratch on D10 and slowly add the modules on my current site as there is likely an interaction causing the bug. On a hunch, I tried disabling all translation and internationalization modules, but the problem remains.

🇨🇦Canada endless_wander

Just checking if this can be bumped to a real release?

🇨🇦Canada endless_wander

Just checking in if this can be bumped to a release

🇨🇦Canada endless_wander

For what it's worth, my experience of this issue is via Webforms with "drafts" enabled and it can cause instances where if a user accidentally uploads the wrong file, that file stays on the website. Users could upload and have uploaded sensitive files by accident that website admins are not supposed to see -- financial records, for example. They click on "Remove" and would expect that the file would be deleted entirely from the system but it does not get removed. See https://www.drupal.org/project/webform/issues/3281450 🐛 If drafts enabled, files uploaded to a submission are never deleted even if user explicitly "removes" them Closed: duplicate

🇨🇦Canada endless_wander

@podarok @Ranjit1032002 could I ask for a bit more transparency when merging changes into non-dev branches? it is not clear from the conversation in this issue what is happening. owenbush asked a question in #2 that was never answered and it is not clear what the patch in #4 is doing

🇨🇦Canada endless_wander

fwiw, had the same issue and patch/mr fixed for me

🇨🇦Canada endless_wander

@camilo.escobar your work and responsiveness on this is incredibly appreciated. thank you!

🇨🇦Canada endless_wander

@podarok @camilo.escobar could you provide some answers to owenbush's points raised in #4? perhaps you have discussed with him privately but as the owner of a site that uses this module, I would like to ensure that this major change will not have repercussions. My site has email notifications that can be sent out on the same day as an event and if they got stuck in the queue and not sent, that could be very bad

🇨🇦Canada endless_wander

Does this need a real release? Upgrade Status module still reports Views RSS as incompatible with Drupal 10

🇨🇦Canada endless_wander

Would like to add my voice for getting a real release of this for Drupal 10 please

🇨🇦Canada endless_wander

These errors are blocking Drupal 10 upgrades as well so would be great to merge them.

I can confirm with the patch from this issue that the errors no longer appear and Upgrade Status module no longer reports these issues from the tests for upgrading to Drupal 10

🇨🇦Canada endless_wander

I am having this problem using a mix of MIMEMail, SMTP Authentication and Mail System modules. The SMTP module maintainers have looked into this issue for their module here -- https://www.drupal.org/project/smtp/issues/3308653 🐛 SMTP From address meta issue Fixed

In Mail System settings, I am using MIME Mail Mailer as the formatter and SMTP Mailer as the sender. This combination is changing the $mailer->Sender value from an address like this:

email@address.com

To this:

<email@address.com>

And thus causing the mail to not get sent with an "Invalid address (Sender)" error.

🇨🇦Canada endless_wander

I am experiencing this issue and confirmed that SMTP module is up-to-date and code from commits in this thread are in my codebase. In debugging my particular instance of this issue, I found the MIMEMail module to be responsible.

If I output $mailerArr from SMTPMailSystem::mail() at line 707, my Sender address looks like this with the brackets. More debugging shows the Sender value is fine until line 432 where the return-path is setting the Sender email address:

        case 'return-path':
          $mailer->Sender = $value;
          break;

In the MIMEMail config at /admin/config/system/mimemail, there is a field for the "Sender email address." Leaving this field blank when submitting the settings form will fill it in automatically with the site email address from Site settings. Whatever address I put into this MIMEMail config field is the one that gets set as Sender in the return-path case above. So, the <> characters appear to be coming from MIMEMail.

There is an active issue for MIMEMail module here -- https://www.drupal.org/project/mimemail/issues/3257799 🐛 RfcComplianceException: RFC 2822 Needs work -- that seems to have the same confusion of responsibility as experiencing here. Maybe this is something in core? Our site recently updated to PHP 8.1 and that seems to be when the problems started so maybe PHP 8.1 is stricter as well? Just spitballing.

🇨🇦Canada endless_wander

Yes, $value['other'] == NULL in my scenario.

The element looks like this:

product_list_attached:
        '#type': radios_other
        '#title': 'Product list attached'
        '#options':
          1: 'Yes - I will attach'
        '#other__type': textarea
        '#other__option_label': 'No - explain:'
        '#other__placeholder': ''
        '#required': true

In the submission triggering the error, option 1 was selected and so the $value array was:

Array
(
    [radios] => 1
    [other] => 
)
🇨🇦Canada endless_wander

This still causes an error for me when using the updated code from this issue. The new condition still fails and therefore this code is not run:

$value = $class::processValue($element, $value);

The new condition also has an illegal isset() function that returns false so I changed this:

if (is_array($value) && count($value) === 2 && array_key_exists($type, $value) && isset($value['other']))

to this:

if (is_array($value) && count($value) === 2 && array_key_exists($type, $value) && array_key_exists('other', $value))

And now the code is working if the value of $value['other'] is empty or null.

Attached patch makes this change

🇨🇦Canada endless_wander

Here's just a quick idea of how this could work, and it's enough for my site as an emergency fix to stop the renaming for now

🇨🇦Canada endless_wander

tested and working for me on both file uploads saved regularly and those saved with "Replace file upload input with an upload button ?" checked.

Production build 0.69.0 2024