Problem/Motivation

As explained in comment #13:

CL Block is still not compatible with the 2.x series and with SDC in core.

There are multiple things to fix in order to make this module compatible.

Proposed resolution

Identify and fix all the issues found and produce a single patch.

Remaining tasks

  • Patch/MR
  • Test
  • Review

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • Some references to SDC components classes will be moved to the core ones, but the functionality of this module should not be affected by those changes.
CommentFileSizeAuthor
#11 3367477-11.patch797 bytesrajab natshah

Issue fork cl_block-3367477

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Rajab Natshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Title: Error: Call to undefined method Drupal\cl_editorial\NoThemeComponentManager::getFilteredComponentTypes() » Error: Call to undefined method getFilteredComponentTypes()
Assigned: rajab natshah » Unassigned
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Not sure if this issue should be moved to the Component Libraries: Blocks project.

rajab natshah’s picture

Project: Component Libraries: Editorial » Component Libraries: Blocks
Version: 2.0.0-beta2 » 1.x-dev
rajab natshah’s picture

Title: Error: Call to undefined method getFilteredComponentTypes() » Fix Error: Call to undefined method getFilteredComponentTypes()

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new797 bytes
rajab natshah’s picture

Status: Active » Needs review
e0ipso’s picture

I am surprised this is the only issue you encountered so far. CL Block is still not compatible with the 2.x series and with SDC in core.

Can we turn this issue into a more generic issue for SDC compatibility?

rajab natshah’s picture

Thanks for passing by this issue.

Yes, for sure if you like that.
I had one issue before this one
#3365591: Fix Block Settings TypeError: array_filter() when pressing Save configuration

Today I faced the following issue too.
#3371765: Fix TypeError when editing Text formats and editors for the Cl Component Embed filter having Argument #1 ($input) must be of type array, null given

It feels that a one refactor issue could manage refactoring the code to support SDC from Drupal ~10.1.0 and CL family of modules to be inline with the 2.0.x branches.

More testing rounds and experimentation with all dynamic config and behaviors.

rajab natshah’s picture

jidrone’s picture

I agree with @e0ipso, I was trying to make it work with the latest version of Drupal core and all other modules and I have found more things to fix, so instead of having a lot of small issues that don't work independently I would rename this for all the compatibility issues.

Once the patch get ready maybe we can create a 2.x version.

jidrone’s picture

Title: Fix Error: Call to undefined method getFilteredComponentTypes() » Compatibility with version 2.x of dependencies and SDC in Core
Issue summary: View changes
Status: Needs review » Needs work
Issue tags: -Needs issue summary update

jidrone’s picture

Status: Needs work » Needs review

I started a new issue fork and MR with multiple fixes:

  • Changed references to CL components to SDC
  • Removed variants functionality
  • Removed CL Components dependency
  • Multiple fixes to get the component schema

There are some things I didn't test yet, like the CK editor embed, I will move it to needs review for now.

e0ipso’s picture

@jidrone it really shows that you have been getting familiar with the codebase! This MR is absolutely fantastic!

I left a bunch of comments in the MR.

Some overarching questions & requests:

  1. Drupal 10 will use CKEditor5, but I didn't see any changes in this department. Perhaps we can add a dependency to https://www.drupal.org/project/ckeditor instead?
  2. We now have sdc_tags as part of cl_editorial to deal with the configuration form on what components are eligible for each feature. Can we also migrate to that as well, or create a ticket to do so? There is an example on how to do it in sdc_display
  3. Can you post screenshots of the module working after the patch? This will help identify the features you have tested.

@jidrone I think this is great for Layout Builder workflows and sites sticking behind with CKEditor4, but in the future I'd like to break this module in two: sdc_block and sdc_ckeditor. What do you think about this?

jidrone’s picture

Status: Needs review » Needs work

Yes, I think the CKEditor integration should be in a separate module.

Dave Reid made their first commit to this issue’s fork.