There is a field type with id = "linked_entity_reference",
There is none for "linked_media_library".
I can't create a new field of the type linked_media_library as described in the notes.
I added a commit replacing the token :delta: with the delta
$result_token = preg_replace('/:delta:/', ':' . $delta . ':', $token_text);
So that
[paragraph:field_pb_image:delta:entity:field_media_image:wide:url]
Works.
interlated → created an issue.
Doesn't work for my use case.
Logically
[paragraph:field_pb_image:0:entity:field_media_image:wide:url]
[paragraph:field_pb_image:1:entity:field_media_image:wide:url]
A paragraph that contains multiple images.
With the logical template
[paragraph:field_pb_image:current-field:entity:field_media_image:wide:url]
I don't think that there is anything in drupal that does this.
interlated → created an issue.
I've updated this branch. Issue still happening with the 1.4 release.
The WKT looks like
interlated → created an issue.
interlated → created an issue.
True. Must be a custom style. Is fixed into the button bar with 'Save' relating to the whole form.
Here is another site with the same administration theme, without the problem.
Closing
interlated → created an issue.
interlated → created an issue.
Is in the composer imported module Commercie. Looks like it is fixed in 1.2.0.
$currency->setLabel($currency_data->title);
seems fixed now.
Close
I've updated https://www.drupal.org/project/feeds_para_mapper/issues/3255360 🐛 Allow for mapping Taxonomy items Needs review . I'm looking at the test cases. EntityReferenceTest should handle this case? Near enough? Is it sensible to merge here or keep a different project.
xml not closed. Was it trying to imply that further customisations should be included?
Pushed the changes that work in my (complicated) example with drupal 11.
- Clearly can't reference plugin['field_types'] in the else clause that checks for field_types existence.
- Wrapper interface updated to resolve various errors e.g.
Feeds\Target\WrapperTarget::__construct(), 3 passed in web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php on line 25 and exactly 6 expected in
Mapping before and after. Test cases ideally created
> composer global require slevomat/coding-standard
Enabled the "Drupal" coding standard to appear in the Intellij configuration. Drupal 11.
> composer global require drupal/coder
> composer global require slevomat/coding-standard
I don't know why the second dependency is not picked up.
phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer,~/.composer/vendor/sirbrillig/phpcs-variable-analysis,~/.composer/vendor/slevomat/coding-standard
Set ruleset files php,module,inc,install,test,profile,theme,css,info,txt,md,yml
phpcs -i
The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend, Drupal and DrupalPractice
Test
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml --sniffs=Drupal.Classes.UnusedUseStatement web/modules/custom/a_module
Appeared in the configuration under PHP - Quality Tools - PHP Code Sniffer.
Spent half a day working out why I got this error
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml --sniffs=Drupal.Classes.UnusedUseStatement web/modules/custom/cbi_deal_seq ERROR: Referenced sniff "SlevomatCodingStandard.Classes.BackedEnumTypeSpacing" does not exist.
I have no idea why composer require drupal/coder didn't install this dependency
interlated → created an issue.
Duplicate of /project/currency_fixer_io/issues/3520110
Duplicate of /project/currency_fixer_io/issues/3520110
Duplicate of /project/currency_fixer_io/issues/3520110
Duplicate of /project/currency_fixer_io/issues/3520110
Duplicate of /project/currency_fixer_io/issues/3520110
Duplicate of /project/currency_fixer_io/issues/3520110
Duplicate of /project/currency_fixer_io/issues/3520110
Duplicate of /project/currency_fixer_io/issues/3520110
Duplicate of /project/currency_fixer_io/issues/3520110
Duplicate of /project/currency_fixer_io/issues/3520110
duplicate of /project/currency_fixer_io/issues/3520110
include_once __DIR__ . '/includes/delete_all.content.batch.inc';
include_once __DIR__ . '/includes/delete_all.entities.batch.inc';
include_once __DIR__ . '/includes/delete_all.user.batch.inc';
Fixes it. Probably should be changed to be more OO?
Needs more work. Got error 'PHP message: Drupal\\Core\\DependencyInjection\\ContainerNotInitializedException: \\Drupal::$container is not initialized yet. \\Drupal::setContainer() must be called with a real container. in /web/core/lib/Drupal.php on line 169 #0 /web/core/lib/Drupal.php(197): Drupal::getContainer()\n#1 /web/modules/patched/delete_all/delete_all.module(10): Drupal::service('extension.list....')\n#2 /1/web/core/lib/Drupal/Core/Hook/HookCollectorPass.php(184): include_once('...')\n#3 /web/core/lib/Drupal/Core/Hook/HookCollectorPass.php(147): Drupal\\Core\\Hook\\HookCollectorPass->collectModuleHookImplementations('modules/patched...', 'delete_all', '/^(?(...', false)\n#4/web/core/lib/Drupal/Core/Hook/HookCollectorPass.php(78): Drupal\\Core\\Hook\\HookCollectorPass::collectAll...'
interlated → created an issue.
Works for me +1
5 live sites RTBC+1
interlated → created an issue.
Tested on 1x site
Installing dropzonejs removes enyo/dropzone >
% composer require drupal/dropzonejs
./composer.json has been updated
Running composer update drupal/dropzonejs
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 1 removal
- Removing enyo/dropzone (5.7.2)
- Locking drupal/dropzonejs (2.11.0)
% composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
- Required package "enyo/dropzone" is not present in the lock file.
interlated → created an issue.
Good on 1x site. RTBC+1
One more error on Drupal 11
drush cr
In ContainerBuilder.php line 1345:
The service "markdown_plugin_manager" tagged "plugin_manager_cache_clear" must not be abstract.
Check that the problem hasn't been addressed in the drupal-11 compatibility task https://www.drupal.org/project/markdown/issues/3438472 📌 Automated Drupal 11 compatibility fixes for markdown Active
RTBC
The automated fixes are working for me.
interlated → created an issue.
> composer require 'drupal/animate_on_scroll:3.0.x-dev@dev'
does not crash my test app (works for me) once the cache is cleared.
I have applied !37. The site ran OK.
The use case is atypical. Prints out the README.md file as part of help. An error that I will follow up on
`Error Error: Call to undefined method League\CommonMark\CommonMarkConverter::convert() in
Drupal\markdown\Plugin\Markdown\CommonMark\CommonMark->convertToHtml() (line 183 of
web/modules/patched/markdown/src/Plugin/Markdown/CommonMark/CommonMark.php). `
The code is
else {
// Use the Markdown filter to render the README.
$filter_manager = \Drupal::service('plugin.manager.filter');
$settings = \Drupal::configFactory()->get('markdown.settings')->getRawData();
$config = ['settings' => $settings];
$filter = $filter_manager->createInstance('markdown', $config);
return $filter->process($text, 'en');
}
Works on a number of sites for me. Please merge.
Already fixed in the development branch
interlated → created an issue.
PHP 8.4 warnings from latest git pull
PHP Deprecated: Drupal\layout_paragraphs\Access\LayoutParagraphsBuilderAccess::access(): Implicitly marking parameter $operation as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/layout_paragraphs/src/Access/LayoutParagraphsBuilderAccess.php on line 52
PHP Deprecated: Drupal\layout_paragraphs\Access\LayoutParagraphsBuilderAccess::access(): Implicitly marking parameter $component_uuid as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/layout_paragraphs/src/Access/LayoutParagraphsBuilderAccess.php on line 52
PHP Deprecated: Drupal\layout_paragraphs\Access\LayoutParagraphsBuilderAccess::access(): Implicitly marking parameter $paragraph_type as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/layout_paragraphs/src/Access/LayoutParagraphsBuilderAccess.php on line 52
PHP Deprecated: Drupal\xmlsitemap\XmlSitemapStorage::__construct(): Implicitly marking parameter $memory_cache as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/xmlsitemap/src/XmlSitemapStorage.php on line 43
PHP Deprecated: Drupal\xmlsitemap\XmlSitemapStorage::doLoadMultiple(): Implicitly marking parameter $ids as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/xmlsitemap/src/XmlSitemapStorage.php on line 78
PHP Deprecated: Drupal\xmlsitemap\Entity\XmlSitemap::loadByContext(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/xmlsitemap/src/Entity/XmlSitemap.php on line 200
PHP Deprecated: Drupal\xmlsitemap\XmlSitemapInterface::loadByContext(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/xmlsitemap/src/XmlSitemapInterface.php on line 147
PHP Deprecated: auto_detect_line_endings is deprecated in /Users/jrobens/Sites/gardensofstone2/web/sites/default/civicrm.settings.php on line 573
PHP Deprecated: Log::log(): Implicitly marking parameter $priority as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/vendor/pear/log/Log.php on line 240
PHP Deprecated: Smarty::getTemplateVars(): Implicitly marking parameter $_ptr as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php on line 1086
PHP Deprecated: Drupal\civicrm\Form\UserProfile::buildForm(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/civicrm/src/Form/UserProfile.php on line 71
PHP Deprecated: Drupal\context_ui\Form\ConditionDeleteForm::buildForm(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/context/modules/context_ui/src/Form/ConditionDeleteForm.php on line 92
PHP Deprecated: Drupal\context_ui\Form\ReactionDeleteForm::buildForm(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/context/modules/context_ui/src/Form/ReactionDeleteForm.php on line 95
PHP Deprecated: Drupal\context\Reaction\Blocks\Form\BlockDeleteForm::buildForm(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/context/src/Reaction/Blocks/Form/BlockDeleteForm.php on line 95
PHP Deprecated: Drupal\context\Reaction\Blocks\Form\BlockFormBase::buildForm(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/context/src/Reaction/Blocks/Form/BlockFormBase.php on line 206
PHP Deprecated: Drupal\fontawesome\Form\EditorIconDialog::buildForm(): Implicitly marking parameter $editor as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/fontawesome/src/Form/EditorIconDialog.php on line 71
PHP Deprecated: Drupal\layout_paragraphs\Form\EditComponentForm::buildForm(): Implicitly marking parameter $layout_paragraphs_layout as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/layout_paragraphs/src/Form/EditComponentForm.php on line 21
PHP Deprecated: Drupal\layout_paragraphs\Form\EditComponentForm::buildForm(): Implicitly marking parameter $component_uuid as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/layout_paragraphs/src/Form/EditComponentForm.php on line 21
PHP Deprecated: Drupal\layout_paragraphs\Form\DeleteComponentForm::buildForm(): Implicitly marking parameter $layout_paragraphs_layout as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/layout_paragraphs/src/Form/DeleteComponentForm.php on line 63
PHP Deprecated: Drupal\layout_paragraphs\Form\DeleteComponentForm::buildForm(): Implicitly marking parameter $component_uuid as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/layout_paragraphs/src/Form/DeleteComponentForm.php on line 63
PHP Deprecated: Drupal\media_bulk_upload\Form\MediaBulkUploadForm::buildForm(): Implicitly marking parameter $media_bulk_config as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/media_bulk_upload/src/Form/MediaBulkUploadForm.php on line 176
PHP Deprecated: Drupal\photos\Form\PhotosUploadForm::buildForm(): Implicitly marking parameter $node as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/photos/src/Form/PhotosUploadForm.php on line 184
PHP Deprecated: Drupal\photos\Controller\PhotosRearrangeController::access(): Implicitly marking parameter $account as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/photos/src/Controller/PhotosRearrangeController.php on line 125
PHP Deprecated: Drupal\photos\Controller\PhotosRearrangeController::access(): Implicitly marking parameter $node as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/photos/src/Controller/PhotosRearrangeController.php on line 125
PHP Deprecated: Drupal\photos\Controller\PhotosRearrangeController::access(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/photos/src/Controller/PhotosRearrangeController.php on line 125
PHP Deprecated: Drupal\tfa\Form\TfaOverviewForm::buildForm(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/tfa/src/Form/TfaOverviewForm.php on line 108
PHP Deprecated: Drupal\tfa\Form\TfaSetupForm::buildForm(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/tfa/src/Form/TfaSetupForm.php on line 163
PHP Deprecated: Drupal\tfa\Form\TfaDisableForm::buildForm(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/tfa/src/Form/TfaDisableForm.php on line 95
PHP Deprecated: Drupal\ds\Form\FieldDeleteForm::buildForm(): Implicitly marking parameter $request as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/contrib/ds/src/Form/FieldDeleteForm.php on line 77
PHP Deprecated: Drupal\photos\Controller\PhotosImageViewController::__construct(): Implicitly marking parameter $entity_repository as nullable is deprecated, the explicit nullable type must be used instead in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/photos/src/Controller/PhotosImageViewController.php on line 72
[success] Cache rebuild complete.
interlated → made their first commit to this issue’s fork.
@shivam_tiwari the config form /admin/config/system/switch_page_theme is crashing for me.
TypeError: strlen(): Argument #1 ($string) must be of type string, Drupal\user\Entity\Role given in strlen() (line 395 of /srv/web/electrifyingbradfield.org/web/core/lib/Drupal/Component/Utility/Unicode.php).
I've pushed a change. Convert 'Role' to a string as is commonly done in drupal core.
Works for me.
Breaks in drush
PHP Fatal error: Trait "Symfony\Component\DependencyInjection\ContainerAwareTrait" not found in /Users/jrobens/Sites/gardensofstone2/web/modules/patched/markdown/src/PluginManager/InstallablePluginManager.php on line 32
Means this module isn't usable for me.
The best shot I can find to implement plugins is from 'feeds tamper'. I can take a shot at implementing this if it helps
use Drupal\Component\Plugin\PluginManagerInterface;
use Drupal\Core\Plugin\DefaultLazyPluginCollection;
ContainerAwareTrait has been deprecated
https://www.drupal.org/project/drupal/issues/3431362
📌
[PP-2] Remove support for ContainerAwareInterface
Postponed
Sometimes, a service needs access to several other services without being sure that all of them will actually be used. In those cases, you may want the instantiation of the services to be lazy. However, that's not possible using the explicit dependency injection since services are not all meant to be lazy.
CacheFactory, CacheTagsInvalidator, CheckProvider, StreamWrapperManager, KernelDestructionSubscriber all look like they could use this technique.
EntityTypeManager and ClassResolver are more tricky and need access to the entire container, but I think we could just inject the container as a service in these cases.
3465765-drupal-11-compatibility working for me.
I've been using this successfully.
From Upgrade Status
web/modules/patched/bibcite/modules/bibcite_entity/config/optional/views.view.bibcite_contributor.yml 287 Support from all Views contextual filter settings for the default_argument_skip_url setting is removed from drupal:11.0.0. No replacement is provided. See https://www.drupal.org/node/3382316 → .
The change says remove it
"The Views setting default_argument_skip_url has been removed from all Views contextual filter settings. This setting has never worked and provided no clear use case that needed support in Drupal core.
webform.components.inc from the webform module also does not exist.
web/modules/patched/webform_civicrm/src/AdminForm.php 1859 File modules/contrib/webform/includes/webform.components.inc could not be loaded from Drupal\Core\Extension\ModuleHandlerInterface::loadInclude
Message
web/modules/patched/webform_civicrm/webform_civicrm.module 476 File modules/patched/webform_civicrm/includes/wf_crm_admin_component.inc could not be loaded from Drupal\Core\Extension\ModuleHandlerInterface::loadInclude
There is no 'includes' directory or wf_crm_admin_component file.
interlated → created an issue.
interlated → created an issue.
interlated → created an issue.
Can 8..x-2 be set as the default branch in gitlab?
Can 8..x-2 be set as the default branch in gitlab?
interlated → created an issue.
composer require 'drupal/webform:6.3.x-dev@dev' is drupal-11 compatible
interlated → made their first commit to this issue’s fork.
interlated → created an issue.
What is a similar module? 'Crop'?
Note - I use Markdown to include module documentation, not with the text editor.
* web/modules/patched/markdown/src/Annotation/ComposerPackage.php 34 Call to deprecated method getInstalledVersion() of class Drupal\markdown\Util\Composer. Deprecated in markdown:8.x-2.0 and is removed from markdown:4.0.0. No replacement.
Marked as deprecated. Delete now?
* web/modules/patched/markdown/src/Annotation/ComposerPackage.php 34 Call to deprecated method getVersionFromClass() of class Drupal\markdown\Util\Composer. Deprecated in markdown:8.x-2.0 and is removed from markdown:4.0.0. No replacement.
As above
* web/modules/patched/markdown/src/BcSupport/SubformState.php 16 Class Drupal\markdown\BcSupport\SubformState extends deprecated class Drupal\markdown\BcSupport\FormStateDecoratorBase. Deprecated in markdown:8.x-2.0 and is removed from markdown:3.0.0. Use Drupal\Core\Form\FormStateDecoratorBase instead.
Delete now
Delete the whole BCSupport package
I can't see the referenced @todo Move upstream to https://www.drupal.org/project/installable_plugins → . Something here https://www.drupal.org/docs/drupal-apis/plugin-api → ?
I can't see any references to "InstallablePlugin" outside of markdown. Is this a custom concept for markdown to manage the parsers?
This refactoring does fall apart here.
* web/modules/patched/markdown/src/Exception/MarkdownFileNotExistsException.php 11 Class Drupal\markdown\Exception\MarkdownFileNotExistsException extends deprecated class Drupal\markdown\Exception\MarkdownException. Deprecated in markdown:8.x-2.0 and is removed from markdown:3.0.0. Use Drupal\markdown\Exception\MarkdownExceptionInterface instead.
Refactor now.
PluginBase
PluginInterface
Works for me...
interlated → created an issue.
interlated → created an issue.
I have 2 more issues I haven't resolved with linked_field.
- Advanced attributes field isn't long enough. I can't see how to alter third-party-settings form
e.g. this is what I want to put in there
$variables['items'][0]['content']['#options']['attributes']['data-dialog-options'][] = '{"width":"80vw","height":"100%", "dialogClass": "course-dialog", "position": {"my": "right top", "at": "right top"}, "show":"slideDown","hide":"slideUp"}';
- tokens don't resolve with layout builder. I debugged the call to resolve token and I get 'value['node'] which I think is fine. Token is [field_course_info_link:uri]
No - didn't fix the problem. Complaint is that there is an array in an array
- removed patched linked_field
- installed from composer
- cache reset
- Fuss around as the config didn't seem to load
- Edit the display in layout builder (there are multiple view-modes)
- Error
- Apply patch
- Cache reset
- Error
The website encountered an unexpected error. Try again later.
TypeError: Cannot access offset of type array on array in Drupal\Core\Entity\ContentEntityBase->get() (line 596 of core/lib/Drupal/Core/Entity/ContentEntityBase.php).
Drupal\linked_field\LinkedFieldManager->getDestination('field', Array, Array) (Line: 361)
linked_field_entity_display_build_alter(Array, Array, NULL) (Line: 552)
Drupal\Core\Extension\ModuleHandler->alter('entity_display_build', Array, Array) (Line: 289)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 282)
Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple(Array) (Line: 226)
Drupal\Core\Entity\Entity\EntityViewDisplay->build(Object) (Line: 461)
Drupal\Core\Entity\EntityViewBuilder->viewField(Object, Array) (Line: 243)
Drupal\Core\Field\FieldItemList->view(Array) (Line: 167)
Drupal\layout_builder\Plugin\Block\FieldBlock->build() (Line: 106)
Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray->onBuildRender(Object, 'section_component.build.render_array', Object)
call_user_func(Array, Object, 'section_component.build.render_array', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'section_component.build.render_array') (Line: 90)
Drupal\layout_builder\SectionComponent->toRenderArray(Array, 1) (Line: 88)
Drupal\layout_builder\Section->toRenderArray(Array, 1) (Line: 228)
Drupal\layout_builder\Element\LayoutBuilder->buildAdministrativeSection(Object, 0) (Line: 112)
Drupal\layout_builder\Element\LayoutBuilder->layout(Object) (Line: 86)
Drupal\layout_builder\Element\LayoutBuilder->preRender(Array)
call_user_func_array(Array, Array) (Line: 113)
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: 870)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 432)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 504)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 248)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 231)
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: 53)
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: 263)
Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 130)
Drupal\shield\ShieldMiddleware->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: 741)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
This fixed a problem with ajax modals
- Install layout builder, linked_field
- Link the title in layout builder.
- install the code below in the custom theme
- clear cache
- Open modal once
- Close modal
- Open again.
A cryptic 'LoadJS' error message is returned on the console. Line 1143 ajax.js.
function tn_preprocess_field(&$variables) {
$element = $variables['element'];
if ($element['#field_name'] == 'title' && $element['#bundle'] == 'course' && $element['#view_mode'] == '_custom') {
tn_add_modal_attributes($variables);
}
}
function tn_add_modal_attributes(&$variables) {
$variables['items'][0]['content']['#options']['attributes']['class'][] = 'use-ajax';
$variables['items'][0]['content']['#options']['attributes']['data-dialog-type'][] = 'modal';
$variables['items'][0]['content']['#options']['attributes']['data-dialog-options'][] = '{"width":"80vw","height":"100%", "dialogClass": "course-dialog", "position": {"my": "right top", "at": "right top"}, "show":"slideDown","hide":"slideUp"}';
$variables['items'][0]['content']['#options']['attributes']['data-ajax-focus'][] = 'none';
}
interlated → created an issue.
interlated → created an issue.
interlated → created an issue.
Basic fix to check for an array. Just this
$destination_src = $settings['destination'] ?? FALSE;
if (is_array($destination_src)) {
$destination_src = $destination_src['field'];
}
2 thoughts
- is there a more 'api' driven approach rather than pulling destination off the settings array?
- apply a type check to $manager->getDestination to ensure that the field name is a string?
Has been working for almost a year on multiple sites
I can see that the editor source does have a pre-filled value in your example. The theme did when I installed it, but the editor source didn't. 10.3.5
interlated → made their first commit to this issue’s fork.
The important information is that you don't configure the ace editor.
- composer require yaml editor
- enable the module.
Now try browsing the site. Check the dblog for error messages. Check chrome network analysis/console for errors.
By default the configuration page has nothing in 'Editor source'.