🇹🇭Thailand @AlfTheCat

Account created on 26 April 2009, about 15 years ago
#

Recent comments

🇹🇭Thailand AlfTheCat

Awesome, I'll have a look at it again :)

🇹🇭Thailand AlfTheCat

Hi @bluegeek9 very excited about the new release, I'll be running with it in the coming days :)

🇹🇭Thailand AlfTheCat

@gilmord thank you very much for the guidance, I now managed to get it working. I was using {{ title }} and when that didn't work, I tried [title]. Using title made it work.

Perhaps out of scope, but is there a way to also ajax-refresh the view so that totals and other, non-editable field values update as well? In my case, I have a view of line items that have an editable quantity field, and non-editable line item total fields and then there is a sub-total aggregated value as well.

🇹🇭Thailand AlfTheCat

I tried #64 but no luck. Slightly different errors than I was getting before in the log:

Error: Call to a member function getEntityTypeId() on null in Drupal\views_entity_form_field\Plugin\views\field\EntityFormField::updateEntity() (line 852 of /var/www/***/modules/contrib/views_entity_form_field/src/Plugin/views/field/EntityFormField.php)

Warning: Trying to access array offset on value of type null in Drupal\views_entity_form_field\Plugin\views\field\EntityFormField::updateEntity() (line 845 of /var/www/***/modules/contrib/views_entity_form_field/src/Plugin/views/field/EntityFormField.php)

Warning: Attempt to read property "_relationship_entities" on null in Drupal\views_entity_form_field\Plugin\views\field\EntityFormField::updateEntity() (line 845 of /var/www/***/modules/contrib/views_entity_form_field/src/Plugin/views/field/EntityFormField.php)

🇹🇭Thailand AlfTheCat

Hi @freibadschwimmer, unfortunately, no, I haven't been able to solve this. In my case too, the markers worked but the emoji picker did not and I had to move away from this module.

🇹🇭Thailand AlfTheCat

@tonka67 It seem like autosave is not working in views. Best result I can get is to use ajax in the view and hit tab and then enter, after typing a value in the editbale field. This updates the field. I tried "blur" and "change".

If autosave for views is broken then a new issue should be opened as this one is closed and maybe only targeted nodes/entities.

🇹🇭Thailand AlfTheCat

Hi all, I can add to this that I'm unable to uninstall Commerce due to this issue, and whenever I delete a field on any kind of entity I now get a WSOD with error: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "commerce_product_variation" entity type does not exist

🇹🇭Thailand AlfTheCat

I'm also 100% lost on how to use this module.

My use case is simple: I need a "price" field where users can enter a price with currency. Same as in Commerce. Has anyone figured out if this module can accomplish this?

🇹🇭Thailand AlfTheCat

I'm experiencing this issue, and when creating a new (global) flag and trying to set the permissions for it the site throws a WSOD on saving the permissions with error:

RuntimeException: Adding non-existent permissions to a role is not allowed. The incorrect permissions are "flag tec_draft_order_excel_lover", "unflag ***". in Drupal\user\Entity\Role->calculateDependencies() (line 207 of /var/www/***/core/modules/user/src/Entity/Role.php).

I can't make new flags available anymore to any users, only UID1 is able to see and use flags.

🇹🇭Thailand AlfTheCat

I tried the patch from #59 for a simple view of ECK entities, with a few regular fields and only one number field using a form field.
After this patch, I can change values but they only seem to get saved in the form. The entities themselves don't get updated.

Two warnings and one error are reported in the log:

Warning: Undefined array key 231 in Drupal\views_entity_form_field\Plugin\views\field\EntityFormField::updateEntity() (line 788 of /var/www/***/modules/contrib/views_entity_form_field/src/Plugin/views/field/EntityFormField.php)

Warning: Attempt to read property "_entity" on null in Drupal\views_entity_form_field\Plugin\views\field\EntityFormField::updateEntity() (line 788 of /var/www/***/modules/contrib/views_entity_form_field/src/Plugin/views/field/EntityFormField.php)

TypeError: Drupal\Core\Render\MainContent\AjaxRenderer::renderResponse(): Argument #1 ($main_content) must be of type array, null given, called in /var/www/***/core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php on line 89 in Drupal\Core\Render\MainContent\AjaxRenderer->renderResponse() (line 49 of /var/www/***/core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php)

Hope this helps!

🇹🇭Thailand AlfTheCat

Hi @dbdrupal, I'm subscribed to this issue as I'm also a heavy ECA user and I needed Twillio integration a while ago and couldn't get it running. I ended up looking at DANSE and Push Framework but didn't have any luck at the time. I reported this to the issue queue which received a reply with a solution. I haven't been able to try it yet, but you might want to have a look at it: 💬 Individual (SMS) notifications Active .

I will get back to the task of sending SMS via ECA but right now I don't have time for what seems to be a pretty big job.

🇹🇭Thailand AlfTheCat

@morbus_Iff, thanks very much! Added to my spamfilter.css :)

🇹🇭Thailand AlfTheCat

Hi @cilefen,

It's possible to trigger the watchdog error by requiring a coupon on the Commerce promotion and then applying it via the coupon form on Commerce checkout. However, interestingly, the way commerce works is that it can apply discounts without a coupon and show the calculated product price in the front end already including the discount. In my case, I am using this for a b2b feature where wholesale roles automatically get a discount applied and consequently, see lower prices on display without using coupons. There is no form involved when viewing products in a view or on a page, yet with inline_form_errors the promotions are not applied. Uninstalling the module quickly fixes that issue.

I don't know what string is expected, I'm applying a 90% discount without any conditions for testing purposes.

Unfortunately, this is the extent of my insight into this issue and I hope it helps. I'm updating the issue status perhaps prematurely.

🇹🇭Thailand AlfTheCat

Hi @jsacksick,

Thanks very much for the quick reply and great insight, I uninstalled the module, and now promotions are working. What is very strange is that without using a coupon the inline_form_errors module also prevents the promotion from being applied.

Who knows where else inline_form_errors could be causing problems because I've been suffering many, seemingly random "oops, something went wrong" errors after routinely updating Drupal.

Seems like this is a Drupal Core bug, or should it be investigated from the side of Drupal commerce as well?

Again, thank you!

🇹🇭Thailand AlfTheCat

To clarify, using coupons also doesn't work, an "Oops, something went wrong, check your browser console" message is shown.

🇹🇭Thailand AlfTheCat

Hi @abhishek_gupta1,

Thanks again, and I've applied the patch and now the log shows "PDF object not set in render function." View/PDF is still not rendering. Hope this helps.

🇹🇭Thailand AlfTheCat

@abhishek_gupta1 very much appreciate the quick patch, I will test this tonight :)

🇹🇭Thailand AlfTheCat

Wow, what a blast from the past! I literally said a little prayer before hitting enter and applying the patch from #8. It applied and on top of that it's working. Absolutely saved my life, I did not expect commerce shipping to not be able to handle different shipping rates for different weights.

The commerce shipping tariff module is either not working (it's in alpha) or wasn't designed to cover this use case. There is a commerce shipping linear weight module, which in its current incarnation does not support a base rate and assumes the weight and price increments to be, well, linear. This patch was the last and only hope.

I now need to make 122 shipping methods (viva the entity_clone module!) to cover all the weight ranges, but at least with this patch we can get the required functionality working and deliver the site.

Legendary patch!

🇹🇭Thailand AlfTheCat

Same issue here, using latest dev and latest version of Drupal.

In the log, I get:

Warning: Trying to access array offset on value of type null in Drupal\commerce_shipping_weight_tariff\Plugin\Commerce\ShippingMethod\ShippingByWeight->calculateRates() (line 134 of /var/www/***/modules/contrib/commerce_shipping_weight_tariff/src/Plugin/Commerce/ShippingMethod/ShippingByWeight.php)

🇹🇭Thailand AlfTheCat

Hi @abhishek_gupta1 thanks very much for the speedy patch. Applied cleanly and errors are gone :)

🇹🇭Thailand AlfTheCat

One additional thought/ observation: as I'm now using CSS rules to remove the ads from the GUI, I noticed that CSS can't be used to hide the column that contains the "commerce inbox" widget. So using

.commerce-dashboard--inbox {
  display: none;

does degrade the look and feel of the interface a bit. It would perhaps look nicer if it were possible to have the commerce-dashboard__metrics card widget span the full width of the page after the inbox is removed via CSS.

🇹🇭Thailand AlfTheCat

Hi guys, I'm also running into issues with unwanted ads in my commerce installs.
I added the
# Disable Commerce Inbox

$settings['commerce_dashboard_show_toolbar_link'] = FALSE;
$settings['commerce_dashboard_fetch_inbox_messages'] = FALSE;

to my settings.php but because it was an existing install it does not remove the content. I also just got served shipping provider ads when I was setting up shipping methods.

Is there any documentation or guidance on how to remove all of the ads from the commerce-related user interfaces and prevent new ones from coming in?

I would vote for a new boolean configuration option in the GUI to allow ads, with a default setting of "off".

🇹🇭Thailand AlfTheCat

Hi Marcus,

Thanks very much for the detailed background information. I'm very grateful for your ability to convince people to release AI Interpolator to the community; I use it daily. I think we look at it the same way, field-level is much more accessible to the general audience whereas ECA certainly comes with a learning curve attached. That's why I figured it might not hurt to have both methods available, but if the current UI inside ECA doesn't allow for the form complexity required by AI Interpolator to create rules then I see how that's a dealbreaker.

Things like fallback rules would be easily accomplished with ECA so maybe when 2.0 is released it can be worth considering.

🇹🇭Thailand AlfTheCat

Hi Jurgen, thank you very much for the insight. I hadn't thought about filing this as a feature request for IEF but that seems indeed the best place to do it. I browsed through the queue there and didn't see any similar issue yet so I created Save newly created entities immediately Active .

Let's hope it will lead to a solution that can benefit many :)

🇹🇭Thailand AlfTheCat

I missed Marcus' comment #5 at the time, and based on my experience in the past months I can offer a slightly different perspective on the question of field-level interpolation vs making interpolation rules available to ECA. I think both methods can exist side by side. For some smaller/ less complex AI implementations, field-level interpolation is easier and faster for users without ECA experience to set up and use. Field-level use cases would be where there are single content editors that perform AI content operations and the operations are mostly limited to the data contained in single nodes. Here, content editors know why the form submits take so long, or are OK with looking at the interpolator batch process for a bit each day, or understand that it's normal that nothing happened and they need to check back in a while as cron processes the interpolator rules they just triggered.

Where it gets more complicated is when AI rules are triggered via community-based user submissions (comment moderation) or where AI rules are triggered conditionally, are chained over many steps, using data from various sources, pulling in data from other entities, need to be distributed over multiple queues, etc.

If it's just me and I'm running a blog with AI, using field-level rules is fine. But if I'm running a forum with lots of users and AI needs to moderate content and spice up the registration process as well as produce rich content with multiple images, then ECA becomes essential in managing, scheduling, evaluating, queueing, bulk processing, and more AI actions because the rate limits and the long execution times inherent to the process poses difficult bottlenecks and UX problems. The only way I can implement AI in any form I need and at scale is with ECA. I think people are not fully aware of what the ECA + AI combo brings to the game, and how it transforms Drupal into an AI powerhouse.

At the moment AI interpolator offers features not paralleled by other modules and I already couldn't do without it. The Openai module recently added ECA integration but lacks the support for images, lists, and more that AI Interpolator offers. Right now I use openai_eca in tandem with field-level AI interpolator but it is not ideal, and it would be perfect to just have the AI interpolator rules available in ECA, with multiple token support as Jurgen describes here Allow multiple tokens for replacement in ECA plugin Needs review . I don't think there needs to be an upgrade path or anything from the current implementation, users can do either/or but also both (maybe 99% of their rules don't require conditionality or other complexity, except that one special use case).

My two cents :)

🇹🇭Thailand AlfTheCat

Hi @marcus, really excited to see the new module!

I just tried to install it via composer which produces an error:

sudo -u www-data composer require 'drupal/ai_interpolator_eca:^1.0@alpha'
./composer.json has been updated
Running composer update drupal/ai_interpolator_eca
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/ai_interpolator_eca ^1.0@alpha -> satisfiable by drupal/ai_interpolator_eca[1.0.0-alpha1].
    - drupal/ai_interpolator_eca 1.0.0-alpha1 requires drupal/eca_content-eca_content * -> could not be found in any version, there may be a typo in the package name.

I went rogue and installed it manually which worked :)

🇹🇭Thailand AlfTheCat

I tried the patch from MR in #10 on Drupal 10.2.3, but no luck in my case.

I have a list field with the first option having machine name "0" which I can't update anymore due to this issue.

🇹🇭Thailand AlfTheCat

I applied the 10.2.0 patch on a 10.2.3 install and no luck.

I have this problem on all my sites, everywhere now. Mostly layout builder (can't add sections, can't add certain blocks) but also elsewhere (can't set default images for fields).

🇹🇭Thailand AlfTheCat

This happened to me again on a new project. This time, visiting the "Discard changes" URL did not solve the problem.

The problem occurred when I created a Flag, and checked the option to list the link to the flag as a field on all my Commerce Product Variations. This instantly broke all of them, and the only way to get Layout builder back in action was to undo that flag setting.

Layout builder is becoming a Liability builder with this issue, I get it on every project at least once. This time it's more problematic as it can't be undone.

🇹🇭Thailand AlfTheCat

I exported a view as a single item, and after deleting and re-creating a field that is included in the view (same machine name) I try to run the import, all on the same site. Validation fails and it won't let me import, stating: "Configuration update.settings depends on the Update Manager module that will not be installed after import."

I don't understand how Update Manager is a dependency of a view, and there is no reference to it in the view export code either. It wasn't installed when I exported and isn't installed when I attempt to import either. Very strange behavior, I don't have config split installed. Drupal 10.2.3.

🇹🇭Thailand AlfTheCat

Hi @bluegeek9 that would be awesome. I'm ready to test any time and a have a real world use for the functionality.

🇹🇭Thailand AlfTheCat

Patch #2 and the patch found here: https://www.drupal.org/project/viewfield/issues/3267240 🐛 Undefined array key "items_to_display" RTBC solved the issue for me.

🇹🇭Thailand AlfTheCat

My suggestion for an ideal solution would be to not require an "Input token" but simply allow tokens inside of the "Prompt" field. I think that is in line with what @jurgenhaas is suggesting.

I have noticed that if I store data inside of tokens, I can use those tokens in the Prompt field. But it does not support prompts like, "Summarize [entity:body]".

🇹🇭Thailand AlfTheCat

It seems like this error is thrown because of the following function, when there are no animations created yet.

function css_background_animation_preprocess_html(&$variables) {
  $config = \Drupal::config('css_background_animation.settings');
  $background_animation_data = $config->get();
  foreach ($background_animation_data['css_background_animation'] as $key => $value) {
    $variables['#attached']['drupalSettings']['css_background_animation'][$key] = $value;
  }
}

The errors go away after adding one.

🇹🇭Thailand AlfTheCat

Fresh install on 10.2.2., and upon install (after patching) there are two warnings in the log:

Warning: Undefined array key "css_background_animation" in css_background_animation_preprocess_html() (line 14 of /var/www/html/web/modules/contrib/css_background_animation/css_background_animation.module)

#0 /var/www/html/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real(2, 'Undefined array...', '/var/www/html/w...', 14)
#1 /var/www/html/web/modules/contrib/css_background_animation/css_background_animation.module(14): _drupal_error_handler(2, 'Undefined array...', '/var/www/html/w...', 14)
#2 [internal function]: css_background_animation_preprocess_html(Array, 'html', Array)
#3 /var/www/html/web/core/lib/Drupal/Core/Theme/ThemeManager.php(261): call_user_func_array('css_background_...', Array)
#4 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(480): Drupal\Core\Theme\ThemeManager->render('html', Array)
#5 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender(Array, false)
#6 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(158): Drupal\Core\Render\Renderer->render(Array)
#7 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#8 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(159): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#9 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#10 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#11 /var/www/html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#12 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#13 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#14 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#26 {main}

And

Warning: foreach() argument must be of type array|object, null given in css_background_animation_preprocess_html() (line 14 of /var/www/html/web/modules/contrib/css_background_animation/css_background_animation.module)

#0 /var/www/html/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real(2, 'foreach() argum...', '/var/www/html/w...', 14)
#1 /var/www/html/web/modules/contrib/css_background_animation/css_background_animation.module(14): _drupal_error_handler(2, 'foreach() argum...', '/var/www/html/w...', 14)
#2 [internal function]: css_background_animation_preprocess_html(Array, 'html', Array)
#3 /var/www/html/web/core/lib/Drupal/Core/Theme/ThemeManager.php(261): call_user_func_array('css_background_...', Array)
#4 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(480): Drupal\Core\Theme\ThemeManager->render('html', Array)
#5 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender(Array, false)
#6 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(158): Drupal\Core\Render\Renderer->render(Array)
#7 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#8 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(159): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#9 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#10 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#11 /var/www/html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#12 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#13 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#14 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#26 {main}
🇹🇭Thailand AlfTheCat

Hi Bojanz, thanks that is very helpful to know.

🇹🇭Thailand AlfTheCat

Hi Marcus, thanks, I've found the updated guidance and will test when I get a chance. Looking forward to the results!

🇹🇭Thailand AlfTheCat

Hi Marcus, yes, I installed ai_interpolator on a fresh project without using tmgmt_openai and there it works without issues.

There is a patch available now in the tmgmt_openai queue. I think we can mark this as fixed :)

🇹🇭Thailand AlfTheCat

Also, the "Proposed resolution: Site builder" seems to be open still, variation fields are not available still on product view modes.

🇹🇭Thailand AlfTheCat

Hi Jurgen,

This is very interesting. I'm finding some useful tokens (product_variation_default) in that list. And thanks very much for explaining why indeed "entity" would not work in this case. Makes perfect sense.

Very excited to learn that in 2.0 tokens will be discovered and especially the display in the UI. That will be a time saver.

I think referring to this issue as documentation will be good, it might be likely for someone in the future to come across the same issue. As such I changed the version to 1.0.x-dev and "fixed", as this is effectively solved in 2.0 via the new token discovery mechanism.

🇹🇭Thailand AlfTheCat

Thanks for the reply, I think something is not properly working with my Slick setup, thumbnail navigation is also not working. I don't have any errors in the log or the console but some of the example views are also not working as expected. I had Slick working on older versions (10.1.x) of Drupal but on a fresh 10.2.x install it's giving me issues. I've used another slider for now, I hope to be able to investigate further what is causing parts of Slick to not work.

🇹🇭Thailand AlfTheCat

Hi @jsacksick, thanks, and perhaps having pseudo-fields available on Product entities would solve this issue. It would certainly be a lot easier.

However, I still don't understand why, if the price field is set as visible on admin/commerce/config/product-variation-types/***/edit/display, it does not show when I add the variations field (set to add-to-cart-form) to a view mode of a product that does not use layout builder. Regardless of being unable to re-order the price field in the manage display tab of the variation type, which is what 🐛 Injected product variation fields intermingle with product fields and there's no way to change the relative weights Active discusses, I'm still a bit surprised that price fields can't be shown in view modes unless Layout Builder is used.

If not something in my setup that is causing this, I think it might be helpful to others to document this in the official documentation.

🇹🇭Thailand AlfTheCat

Hi @jsacksick, thanks for the reply. I was just updating the issue when your comment came in. Thanks for the reply, I traced it back to an incompatibility with Commerce Currency Resolver.

🇹🇭Thailand AlfTheCat

After tinkering some more, I learned I must add a price for each available currency. I use Commerce Currency Resolver. and, apparently, currency conversion is not working together with this module yet. Even though the variation has a single currency price field with conversion happening automatically, inside price lists a price needs to be defined for every possible currency.

I found a few issues regarding multi-currency setups, but they don't seem to touch this use case. I'm not sure if this issue is perhaps related to Add a currency resolver API (with a CurrentCurrency object). Needs work , as it states in the issue description:

This would be useful for example in Commerce Pricelist, cause it would allow defining prices per-currency and having them automatically selected. Relevant contrib module: http://drupal.org/project/commerce_currency_resolver

however, in my case I want to enter only 1 price in 1 currency, like is done when creating variations, and then have their prices converted according to the defined exchange rates.

🇹🇭Thailand AlfTheCat

Patch from #43 applies but it seems only to work for node flags. I'm trying to use a token in a flag link on a custom ECK entity and it's not working.

🇹🇭Thailand AlfTheCat

This is helpful to know, I did not know that models that react to *any* bundle of an entity type will be slated for deletion if that field is removed from any of the bundles. It makes logical sense.

Could a conditional check if the bundle has the field prevent this? So a model can react to all bundles but always checks first if the bundle has the field before it tries to execute anything?

🇹🇭Thailand AlfTheCat

I made another discovery here, I could not get the action "Get field value" to work, to build a list of order_items until I specified "commerce_order" as the entity to act on. Leaving that field empty made the action not execute.

Hence it really seems that the "entity" token is empty, and that causes problems with certain actions, including "Entity:load".

I am on 1.x dev so apologies if this is fixed in the 2.x branch.

🇹🇭Thailand AlfTheCat

I might be able to add something here, as I am making a new model that reacts to "order is paid" and I noticed that the "[entity]" token does not work. Tokens like "[commerce-order:]" do work. So when I create an action, "Entity: load", and I specify "[entity:order_id"] it will not work, but when I use [commerce-order:order_id] it does load the order entity.

The documentation states that:

When an entity related event gets triggered, e.g. Presave content entity, then ECA automatically puts the related entity onto the token stack with the name entity and also under the name of the entity type, e.g. node, user, etc.

...so perhaps we do have a bug here.

🇹🇭Thailand AlfTheCat

@abhishek_gupta1 fantastic, very grateful for that patch. Worked perfectly, thank you.

🇹🇭Thailand AlfTheCat

@cilefen,

I'm not sure what caused the problem so I'm afraid I can't list the exact steps to reproduce it.
I managed to solve the issue by directly visiting /admin/commerce/config/product-types/[PRODUCT_TYPE]/edit/display/default/layout/discard-changes and clicking "Confirm".

Here is the stacktrace:

#0 /var/www/XXX/core/modules/layout_builder/src/SectionComponent.php(245): Drupal\Core\Plugin\Context\ContextHandler->applyContextMapping()
#1 /var/www/XXX/core/modules/layout_builder/src/Event/SectionComponentBuildRenderArrayEvent.php(70): Drupal\layout_builder\SectionComponent->getPlugin()
#2 /var/www/XXX/core/modules/layout_builder/src/SectionComponent.php(89): Drupal\layout_builder\Event\SectionComponentBuildRenderArrayEvent->__construct()
#3 /var/www/XXX/core/modules/layout_builder/src/Section.php(88): Drupal\layout_builder\SectionComponent->toRenderArray()
#4 /var/www/XXX/core/modules/layout_builder/src/Element/LayoutBuilder.php(228): Drupal\layout_builder\Section->toRenderArray()
#5 /var/www/XXX/core/modules/layout_builder/src/Element/LayoutBuilder.php(112): Drupal\layout_builder\Element\LayoutBuilder->buildAdministrativeSection()
#6 /var/www/XXX/core/modules/layout_builder/src/Element/LayoutBuilder.php(86): Drupal\layout_builder\Element\LayoutBuilder->layout()
#7 [internal function]: Drupal\layout_builder\Element\LayoutBuilder->preRender()
#8 /var/www/XXX/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(111): call_user_func_array()
#9 /var/www/XXX/core/lib/Drupal/Core/Render/Renderer.php(858): Drupal\Core\Render\Renderer->doTrustedCallback()
#10 /var/www/XXX/core/lib/Drupal/Core/Render/Renderer.php(421): Drupal\Core\Render\Renderer->doCallback()
#11 /var/www/XXX/core/lib/Drupal/Core/Render/Renderer.php(493): Drupal\Core\Render\Renderer->doRender()
#12 /var/www/XXX/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender()
#13 /var/www/XXX/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render()
#14 /var/www/XXX/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#15 /var/www/XXX/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(231): Drupal\Core\Render\Renderer->executeInRenderContext()
#16 /var/www/XXX/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#17 /var/www/XXX/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#18 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#19 /var/www/XXX/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#20 /var/www/XXX/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#21 /var/www/XXX/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#22 /var/www/XXX/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#23 /var/www/XXX/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#24 /var/www/XXX/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#25 /var/www/XXX/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle()
#26 /var/www/XXX/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#27 /var/www/XXX/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#28 /var/www/XXX/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#29 /var/www/XXX/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#30 /var/www/XXX/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#31 /var/www/XXX/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#32 /var/www/XXX/index.php(19): Drupal\Core\DrupalKernel->handle()
#33 {main}
🇹🇭Thailand AlfTheCat

5321 didn't work for me, in my case I tried to add an 'is one of' views filter of moderation states of a referenced node, using a relationship on the filter.

🇹🇭Thailand AlfTheCat

I'm getting this error too, no idea where it came from, it's on one of my commerce product types and I can't disable layout builder for it through the UI. Can't edit, can't disable... Totally stuck.

🇹🇭Thailand AlfTheCat

Thanks @hexabinaer for the detailed replies. It's clear now.

🇹🇭Thailand AlfTheCat

Latest patch works, thanks everyone!

🇹🇭Thailand AlfTheCat

Yeah I found that option, but no way to import that code into the configurator or anything like that. Anyway, thanks for your attention to the issue. I'll definitely use this module for other sliders, was just hoping I could easily create that beautiful product gallery :). I've tried 5 different modules by now, none of them seem to be able to do the job.

🇹🇭Thailand AlfTheCat

Hi @AbdeI, thanks very much. However, this configuration renders the thumbnails, no main image.

What I'm looking for is exactly like this:

🇹🇭Thailand AlfTheCat

Hi mahtab_alam, yes I installed the module but when using the configurator at https://swiffyslider.com/configuration/ there is no way I can create the "Product Gallery" from the example page at https://swiffyslider.com/examples/. It's exactly the gallery I need but can't create using a number of modules. Thanks.

🇹🇭Thailand AlfTheCat

Same here, no idea how to get this to work, it seems like the tiny instruction in the readme is not applicable anymore either.

🇹🇭Thailand AlfTheCat

Hi Jurgen, thanks very much for the guidance, I checked the configuration export and found no mention of the deleted ECA model. I tried importing it again and this time it worked. I'm not yet too familiar with Drupal's new (for me) way of handling config, I think maybe on cron the site's configuration was updated to reflect the removed ECA model from it.

I feel better knowing that I'm not alone in making the error of accidentally deleting critical parts of a site, I guess one day my first attempt at a Drupal module could be a "config_protect" module :)

🇹🇭Thailand AlfTheCat

Tried the patch from the MR and unfortunately, no luck either.

In my case, unfortunately, it's just not an option to have users edit their variations one-by-one after they've been created on the fly via IEF during product creation.

It looks like I have to abandon commerce_stock for this reason, so I'm thinking to replicate the features of commerce_stock by simply using ECK to create a "Stock location" entity and a "Stock transaction" entity, as well as a hidden "Stock level" field on the variation entity, and have ECA update stock levels on checkout completion and on returns.

I was hoping I could leave commerce stock enabled and have ECA set the value for "always in stock" to "on" (not possible to set a default value for the boolean), then hide it from the UI and have ECA flip it to "off" when the stock level field reaches 0. I was hoping we would then still have the "Out of stock" button behavior commerce_stock provides. Except, when I try this, variations that have "Always in stock" flipped On, they still show as out of stock in the front-end. When I change the default service to "Always in stock" and I flip the boolean off, the product still shows as being in stock so that doesn't work either.

🇹🇭Thailand AlfTheCat

Hi @freelock, would be awesome to have an ECA action to set the initial stock level. I think it would be useful in a number of scenarios.
Turning this into a feature request.

🇹🇭Thailand AlfTheCat

@maxwellkeeble thanks for the updated patch and I agree, in my case this patch is needed to allow users to add stock when creating variations via IEF when creating new products, on commerce installs that have multiple stores. Critical to a good UX IMO, it's not feasible to present users with the multi-step process of adding variations or updating them after product creation.

🇹🇭Thailand AlfTheCat

Hi Szy, thanks very much, I totally missed the config options. Very cool!

🇹🇭Thailand AlfTheCat

OK, thanks very much for the comprehensive clarification. And I will mind the 1.2.x branch issue. I will go the direction of reacting to the saving of the parent entity and then loop through the referenced child entities that haven't created variations yet. This will be interesting because I've never successfully created a loop with ECA but I know it's possible. I will share my results here for the benefit of others who are trying to accomplish something similar.

Production build 0.69.0 2024