πŸ‡ΊπŸ‡ΈUnited States @makbeta

Account created on 15 January 2007, over 17 years ago
#

Merge Requests

Recent comments

πŸ‡ΊπŸ‡ΈUnited States makbeta

I didn't have HAL in my dependencies but ran into the same issue installing this on Drupal 10.1.
After running composer require cweagans/composer-patches, I removed composer.lock and then ran composer require srijanone/ezcontent:^2.2.5 and installation succeeded.
Adding this info in case someone else runs into the same issue.

πŸ‡ΊπŸ‡ΈUnited States makbeta

@abhishek_virasat, I didn't attach a patch, but contributed my code directly in Gitlab and submitted a merge request, so it's easier for the module maintainers to incorporate the solution. The merge request can be viewed as a patch by adding .diff to the end, if it's ever needed to be incorporated into a composer file.

Ex: https://git.drupalcode.org/project/conditional_fields/-/merge_requests/3...

Both our solutions are valid, and pass the automated test.
I went with the more concise syntax with indirect conditional, I would say it would be up to the module maintainers to decide which approach they would want to incorporate.

πŸ‡ΊπŸ‡ΈUnited States makbeta

Sorry, syntax error in path #4, trying another patch version.

πŸ‡ΊπŸ‡ΈUnited States makbeta

Improved the logic to better handle the case when the table for the custom product type does not exist.

πŸ‡ΊπŸ‡ΈUnited States makbeta

Patch in #16 worked for me and solved the error Undefined array key "type" D7Webform.php:425

πŸ‡ΊπŸ‡ΈUnited States makbeta

Previous patch did not work correctly with shipping, the exclusion logic would always fails.
Reworked the code to get product types from the database table and test against those for standard and custom product types.

πŸ‡ΊπŸ‡ΈUnited States makbeta

Looks like the migration of coupon usage relies on Coupon Usage module (data in the database table commerce_coupon_usage_transaction), which is not something I have in my case. Coupons can be associated with an order in D7 without the Coupon Usage module. The module can be enabled in D7, but the historical data is then not populated.
During the migration to D9, the discount is migrated by the coupon information is not migrated into the coupon field. The order to coupon association can be read from another table field_data_commerce_coupons, which is not handled by this specific solution, but can be extended.

πŸ‡ΊπŸ‡ΈUnited States makbeta

I'm attempting to use/test this solution. The coupon and discount migration seems to work just fine. However, I don't get the `upgrade_commerce1_coupon_usage` as an available migration. I see the YML file and it seems to be checking out, but for some reason the migration not being included into the list.
My D7 site was configured to use coupons and discounts. I'm wondering if I need to do something to enable this migration or if certain criteria needs to be met for this migration to register.

Any input on this will be greatly appreciated.

πŸ‡ΊπŸ‡ΈUnited States makbeta

Tested the patch #45 with v3.2 & v4 against Drupal 9 running PHP v8.
@heddn Can this be incorporated into version 3.2 & 4, so all this work doesn't get lost in iterations?

πŸ‡ΊπŸ‡ΈUnited States makbeta

I tried applying the patch from #10 and sadly it didn't work. The site crashed and the error I got is included below. Seems unrelated or may be tied to some other module configuration. The problem went away when the patch was removed, so it's definitely related.

My team have noted a pattern that clone works on paragraphs embedded into other paragraphs, but not the nodes. Adding it here in case it's helpful in replicating and solving the issue.

PHP Fatal error:  Uncaught Error: __clone method called on non-object in /app/web/core/lib/Drupal/Core/Routing/UrlGenerator.php:432
Stack trace:
#0 /app/web/core/lib/Drupal/Core/Routing/UrlGenerator.php(270): Drupal\Core\Routing\UrlGenerator->getRoute('<current>')
#1 /app/web/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php(105): Drupal\Core\Routing\UrlGenerator->generateFromRoute('<current>', Array, Array, true)
#2 /app/web/core/lib/Drupal/Core/Url.php(765): Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('<current>', Array, Array, false)
#3 /app/web/modules/contrib/rules/src/ContextProvider/CurrentPathContext.php(42): Drupal\Core\Url->toString()
#4 /app/web/modules/contrib/rules/src/ContextProvider/CurrentPathContext.php(62): Drupal\rules\ContextProvider\CurrentPathContext->getRuntimeContexts(Array)
#5 /app/web/core/lib/Drupal/Core/Plugin/Context/LazyContextRepository.php(97): Drupal\rules\ContextProvider\CurrentPathContext->getAvailableContexts()
#6 /app/web/core/lib/Drupal/Core/ParamConverter/EntityConverter.php(141): Drupal\Core\Plugin\Context\LazyContextRepository->getAvailableContexts()
#7 /app/web/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php(100): Drupal\Core\ParamConverter\EntityConverter->convert('node_search', Array, 'entity', Array)
#8 /app/web/core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php(45): Drupal\Core\ParamConverter\ParamConverterManager->convert(Array)
#9 /app/web/core/lib/Drupal/Core/Routing/Router.php(256): Drupal\Core\Routing\Enhancer\ParamConversionEnhancer->enhance(Array, Object(Symfony\Component\HttpFoundation\Request))
#10 /app/web/core/lib/Drupal/Core/Routing/Router.php(130): Drupal\Core\Routing\Router->applyRouteEnhancers(Array, Object(Symfony\Component\HttpFoundation\Request))
#11 /app/web/core/lib/Drupal/Core/Routing/Router.php(103): Drupal\Core\Routing\Router->matchRequest(Object(Symfony\Component\HttpFoundation\Request))
#12 /app/web/core/lib/Drupal/Core/Path/PathValidator.php(161): Drupal\Core\Routing\Router->match('/search')
#13 /app/web/core/lib/Drupal/Core/Path/PathValidator.php(122): Drupal\Core\Path\PathValidator->getPathAttributes('/search', Object(Symfony\Component\HttpFoundation\Request), false)
#14 /app/web/core/lib/Drupal/Core/Path/PathValidator.php(89): Drupal\Core\Path\PathValidator->getUrl('search', false)
#15 /app/web/core/lib/Drupal/Core/Url.php(427): Drupal\Core\Path\PathValidator->getUrlIfValidWithoutAccessCheck('search')
#16 /app/web/core/lib/Drupal/Core/Url.php(319): Drupal\Core\Url::fromInternalUri(Array, Array)
#17 /app/web/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php(175): Drupal\Core\Url::fromUri('internal:/searc...', Array)
#18 /app/web/core/modules/menu_link_content/src/Entity/MenuLinkContent.php(94): Drupal\link\Plugin\Field\FieldType\LinkItem->getUrl()
#19 /app/web/core/modules/menu_link_content/src/Entity/MenuLinkContent.php(156): Drupal\menu_link_content\Entity\MenuLinkContent->getUrlObject()
#20 /app/web/core/modules/menu_link_content/src/Plugin/Deriver/MenuLinkContentDeriver.php(69): Drupal\menu_link_content\Entity\MenuLinkContent->getPluginDefinition()
#21 /app/web/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\menu_link_content\Plugin\Deriver\MenuLinkContentDeriver->getDerivativeDefinitions(Array)
#22 /app/web/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array)
#23 /app/web/core/lib/Drupal/Core/Menu/MenuLinkManager.php(164): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
#24 /app/web/core/lib/Drupal/Core/Menu/MenuLinkManager.php(189): Drupal\Core\Menu\MenuLinkManager->getDefinitions()
#25 /app/web/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php(82): Drupal\Core\Menu\MenuLinkManager->rebuild()
#26 /app/web/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php(70): Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber->menuLinksRebuild()
#27 [internal function]: Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber->onRouterRebuild(Object(Drupal\Component\EventDispatcher\Event), 'routing.route_f...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#28 /app/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Drupal\Component\EventDispatcher\Event), 'routing.route_f...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#29 /app/web/core/lib/Drupal/Core/Routing/RouteBuilder.php(197): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Drupal\Component\EventDispatcher\Event), 'routing.route_f...')
#30 /app/web/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild()
#31 /app/web/core/includes/common.inc(587): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
#32 /app/web/core/includes/utility.inc(41): drupal_flush_all_caches(Object(Drupal\Core\DrupalKernel))
#33 /app/vendor/drush/drush/src/Commands/core/CacheCommands.php(228): drupal_rebuild(Object(Composer\Autoload\ClassLoader), Object(Symfony\Component\HttpFoundation\Request))
#34 [internal function]: Drush\Commands\core\CacheCommands->rebuild(Array)
#35 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
#36 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#37 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#38 /app/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#39 /app/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#40 /app/vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#41 /app/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#42 /app/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#43 /app/vendor/drush/drush/src/Runtime/Runtime.php(124): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#44 /app/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#45 /app/vendor/drush/drush/drush.php(79): Drush\Runtime\Runtime->run(Array)
#46 /app/vendor/drush/drush/drush(4): require('/app/vendor/dru...')
#47 /app/vendor/bin/drush(120): include('/app/vendor/dru...')
#48 {main}
  thrown in /app/web/core/lib/Drupal/Core/Routing/UrlGenerator.php on line 432
πŸ‡ΊπŸ‡ΈUnited States makbeta

Updated patch, the previous patch didn't test for equality in the alpha widget.

πŸ‡ΊπŸ‡ΈUnited States makbeta

Attached is a patch with a proposed solution.
Tested on PHP 8.0 Drupal 9.4 MariaDb 10.4

Production build 0.69.0 2024