πŸ‡©πŸ‡ͺGermany @Istari

Account created on 30 January 2023, over 1 year ago
  • future Software Developer (currently in education) at erdfischΒ 
#

Recent comments

πŸ‡©πŸ‡ͺGermany Istari

The patch doesn"t work for me.
This is the error output:

Fatal error: Declaration of Drupal\field_permissions_group\Plugin\FieldPermissionType\CustomGroupAccess::create(Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, ?Drupal\field\FieldConfigInterface $field_config = null) must be compatible with Drupal\field_permissions\Plugin\FieldPermissionType\Base::create(Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, ?Drupal\field\FieldStorageConfigInterface $field_storage = null) in /var/www/html/web/modules/contrib/field_permissions_group/src/Plugin/FieldPermissionType/CustomGroupAccess.php on line 70

Tested with Drupal 10.1.8
Group 3.2.2
Field Permissions 1.3

πŸ‡©πŸ‡ͺGermany Istari

I'm also facing a problem in 10.2 with 8.x-1.dev (as metioned in #119: Add book navigation links to non 'book page' nodes β†’ ( https://www.drupal.org/project/ckeditor_templates/issues/3273358#comment... ✨ CKEditor 5 support for Content Templates Needs review )
When adding a template to `/admin/config/content/ckeditor-templates/foo', CKEditor will cut off the `div` container in the rendered output.

I double checked my settings and even tried to manipulate the `config.yml` itself but it doesn't show the results I expected.

I wonder why are you using a CKE editor to get to the values of the HTML code you want to use as template? Are there any important differences to a text block field type?

πŸ‡©πŸ‡ͺGermany Istari

I have tested the patch and it comes to a thrown error:

Error: Call to a member function getName() on null in Drupal\field_permissions_group\Plugin\FieldPermissionType\CustomGroupAccess->hasFieldAccess() (line 95 of modules/contrib/field_permissions_group/src/Plugin/FieldPermissionType/CustomGroupAccess.php).
Drupal\field_permissions\FieldPermissionsService->getFieldAccess('view', Object, Object, Object) (Line: 39)
field_permissions_entity_field_access('view', Object, Object, Object) (Line: 350)
Drupal\Core\Entity\EntityAccessControlHandler->Drupal\Core\Entity\{closure}(Object, 'field_permissions') (Line: 388)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('entity_field_access', Object) (Line: 351)
Drupal\Core\Entity\EntityAccessControlHandler->fieldAccess('view', Object, Object, Object, 1) (Line: 154)
Drupal\Core\Field\FieldItemList->access('view', NULL, 1) (Line: 253)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 268)
Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple(Array) (Line: 339)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 281)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 238)
Drupal\Core\Entity\EntityViewBuilder->build(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: 797)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 386)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 592)
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: 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: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce
- Create group
- Create insider and outsider role
- Make sure to have admin access to group
- Create two testing field types (A and B)
- assign view access to insider for field type A
- assign no access to insider for field type B
- open group page (/group/id)

πŸ‡©πŸ‡ͺGermany Istari

I did a little research within the code and found out, that the function CustomGroupAccess::create( ) needs the argument FieldStorageConfigInterface $field_storage, based on the Base class (Base.php) which it is inherited from.

So before:

  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, FieldConfigInterface $field_config = NULL) {
    return new static(
      $configuration,
      $plugin_id,
      $plugin_definition,
      $field_config,
      $container->get('field_permissions.permissions_service'),
      $container->get('plugin.manager.group_content_enabler')
    );
  }

And after the changes:

  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, FieldStorageConfigInterface $field_storage = NULL) {
    return new static(
      $configuration,
      $plugin_id,
      $plugin_definition, 
      $field_storage ,
      $container->get('field_permissions.permissions_service'),
      $container->get('plugin.manager.group_content_enabler')
    );
  }

Changing this comes with a new follow up error that says:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "plugin.manager.group_content_enabler". in Drupal\Component\DependencyInjection\Container->get() (line 157 of core/lib/Drupal/Component/DependencyInjection/Container.php).

So taking a look into the field_permissions_group.service.yml, field_permissions_group.services.yml, and group.services.yml neither shows a similar defined service or with similar logic.

I'd like to fix this issue, but my knowledge is far beyond of the understanding of this, cause I'm pretty new to Drupal.
But maybe this is a help for someone more experienced like me who may fixing it or giving a hint into the right direction :P

I hope it helps :)

πŸ‡©πŸ‡ͺGermany Istari

Anything new with this error?
I'm facing the same issue.

πŸ‡©πŸ‡ͺGermany Istari

Can confirm that patch #101 works for D9.5.11. :)
Thx for your work :)

πŸ‡©πŸ‡ͺGermany Istari

thx for your help, fixes my problem too :)
I'm also linking the original issue, so it's easier to comprehend the context of the problem :)

#3241295 πŸ› CKEditor 5 isn't respecting field widgets row settings Fixed

πŸ‡©πŸ‡ͺGermany Istari

Can confirm that patch #99 isn't working for me, but insead #91 works fine.

I have implemented two ways of templates:
1. programmatically implemented template
2. template by configuration within UI.

If I delete the template made by UI, I don't have access to the programmatically created one.
Using the template made by UI it works as intended.

If you have any questions or if I'm wrong with something, pls tell me :)

πŸ‡©πŸ‡ͺGermany Istari

@drupatz The problem with not adding any HTML tag values in drupalbreaksEditing.js is, that this file provides the logic for DOM manipulation between CKEditor and Drupal, said in MVC pattern: the CKEditor upcast and downcast pipeline are representative for view layer and model layer. This is where adding the <drupalbreaks> tag insertion happens and gets converted to Drupal.

The basic logic behind my module modification is that CKEditor manipulates the DOM with insertion of the HTML tag.
This tag is fetched by DrupalbreaksFilter.php and swapps <drupalbreaks> to <!--break--> which Drupal magic interprets as break between content and teaser.

But I agree with you that the additional <p> is unnessesary.

I'd appreciate a feedback if the merged changes by @dsnopek are working as intended.

πŸ‡©πŸ‡ͺGermany Istari

I'd like to submit a suggestion:

Provides a highly customizable area that opens an area in the foreground of a website (a modal), as known from a website's cookie settings.

πŸ‡©πŸ‡ͺGermany Istari

How about this:

Adds n new paragraph between two existing paragraphs, provided by a categorizsed pop up library with an overview of available paragraph types.

πŸ‡©πŸ‡ͺGermany Istari

If needed I can test it on local setup too, so we have a double confirmation that it works

πŸ‡©πŸ‡ͺGermany Istari

made suggessted changes with removing package.json, package-lock.json, yarn.lock and webpack.config (for generating a minified version).

So you should have access to those files

πŸ‡©πŸ‡ͺGermany Istari

Sure if you want to change it feel free to do it :)
When it's all finished, I'll look up the changes and see what I can learn from it :)

πŸ‡©πŸ‡ͺGermany Istari

thx @dsnopek for your help.
I pushed the changes. If anything is unclear or need to be done just tell me :)

πŸ‡©πŸ‡ͺGermany Istari

Having a problem with pushing my code.
The error message says:
"remote: You are not allowed to push code to this project.
fatal: unable to access 'https://git.drupalcode.org/project/ckeditor_drupalbreaks.git/': The requested URL returned error: 403"
when trying to push my branch into 2.0.x.

I created a new custom access token and use those information to log in, but it keeps denying the access..
Any ideas?

πŸ‡©πŸ‡ͺGermany Istari

We are get mentored by Yepa in DrupalCon Lille for the first time contribution workshop :)

πŸ‡©πŸ‡ͺGermany Istari

Heya @dsnopek thx for your reply :)
I will open up a new branch this week due to tight time schedule on DrupalCon.

πŸ‡©πŸ‡ͺGermany Istari

Can also confirm that patch with Upgrade Status enabled works.

πŸ‡©πŸ‡ͺGermany Istari

Sry forgot to open a MR the first time.
MR2 in 3296752-migration-to-ckeditor5

πŸ‡©πŸ‡ͺGermany Istari

Heya phjou,
I will check this asap and give you feedback.
For the CKEditor 5 migration fakeobjects should't be necessary anymore and maybe I've just overseen it to exclude it.
I will give it a try asap :)

πŸ‡©πŸ‡ͺGermany Istari

A few weeks ago I uploaded a new merge request with the files of the Drupal 10 and CKEditor5 migration.
You can see it here πŸ“Œ Automated Drupal 10 compatibility fixes Fixed under comment #6.

πŸ‡©πŸ‡ͺGermany Istari

Could you provide the steps which step you have taken untill the error message came up?

πŸ‡©πŸ‡ͺGermany Istari

- Updated Drupalbreaks to CKEditor5 object orientated architecture
- added DrupalbreaksFilterPlugin.php which uses FilterBase
- FakeObject become obsolete

πŸ‡©πŸ‡ͺGermany Istari

Mysdiir β†’ made their first commit to this issue’s fork.

Production build 0.69.0 2024