- Issue created by @kevin.pfeifer
- 🇦🇹Austria kevin.pfeifer
As explained above we had our own Shortcode classes which overwrote/extended the
__construct
method of theShortcodeBase
class.We had to adjust
public function __construct(array $configuration, $plugin_id, $plugin_definition, $cart_provider = NULL, EntityTypeManagerInterface $entity_type_manager = NULL) { parent::__construct($configuration, $plugin_id, $plugin_definition);
to
public function __construct(array $configuration, $plugin_id, $plugin_definition, RendererInterface $renderer, $cart_provider = NULL, EntityTypeManagerInterface $entity_type_manager = NULL) { parent::__construct($configuration, $plugin_id, $plugin_definition, $renderer);
and adjust the
create()
method topublic static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { return new static( $configuration, $plugin_id, $plugin_definition, $container->get('renderer'), \Drupal::moduleHandler()->moduleExists('commerce') ? $container->get('commerce_cart.cart_provider') : [], $container->get('entity_type.manager') );
The
$container->get('renderer'),
was added - 🇺🇸United States CProfessionals
Thank you so much for posting your code. You Rock!
- 🇺🇸United States CProfessionals
Updating this issue. NikaDev on Themeforest actually sent out an update 2.0 in September that resolved this issue. I just overwrote the old nd_visualshortcode module with the new nd_visualshortcode module from the Drupal 10 distribution of the theme. Everything seems to be working.
- 🇪🇸Spain gauladell
Thank you! It also worked for me,
But i needed to add also :
use Drupal\Core\Render\RendererInterface;