πŸ‡¦πŸ‡ͺUnited Arab Emirates @schlaukopf

Dubai
Account created on 22 September 2016, almost 8 years ago
  • Drupal Developer at AgileanaΒ  …
#

Recent comments

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

This is basically the changes on 9, but this time composer should be able to apply the changes.

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

I checked both MRs, but the deprecated code was not addressed, and the patches were failing to apply, so this is a patch that includes both, and I removed drupal 8 from core_requirements, since Drupal\Core\Entity\Plugin\Condition\Deriver\EntityBundle was added on 9.3.x

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

I tested the patch and it works, but I agreed with @bramdriesen on poll_edit, but maybe something like the core does like entity.poll.edit_form

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

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

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

I forgot to rebase, so this is after #84 where I move the theme prefixing into the new API.

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

This should fix the error in the pipeline

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

This should fix the error in the pipeline

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

I moved the theme name as a function parameter, I didn't move the whole if-statement from #91, because I'm not sure if replacing the old theme prefix should apply to all calls to that function.

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

if we want to move the theme prefixing to the new API, I think we need to move this from block_theme_initialize (core/modules/block/block.module) as well

if (str_starts_with($default_theme_block_id, $default_theme . '_')) {
  $id = str_replace($default_theme, $theme, $default_theme_block_id);
}
else {
  $id = $theme . '_' . $default_theme_block_id;
}
$id = \Drupal::service('block.machine_name_generator')->getUniqueMachineName($id);

perhaps the whole if/else statement?

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

New changes were introduced on core/modules/block/src/BlockForm.php, so I did a rebase from #76 and fixed a conflict, and then I removed the line on core/phpstan-baseline.neon that was causing phpstan to fail.

diff --cc core/modules/block/src/BlockForm.php
index 8eb188020e,4583ed58c0..0000000000
--- a/core/modules/block/src/BlockForm.php
+++ b/core/modules/block/src/BlockForm.php
@@@ -387,28 -402,7 +402,32 @@@ class BlockForm extends EntityForm 
     */
    public function getUniqueMachineName(BlockInterface $block) {
      $suggestion = $block->getPlugin()->getMachineNameSuggestion();
++<<<<<<< HEAD
 +    if ($block->getTheme()) {
 +      $suggestion = $block->getTheme() . '_' . $suggestion;
 +    }
 +
 +    // Get all the blocks which starts with the suggested machine name.
 +    $query = $this->storage->getQuery();
 +    $query->condition('id', $suggestion, 'CONTAINS');
 +    $block_ids = $query->execute();
 +
 +    $block_ids = array_map(function ($block_id) {
 +      $parts = explode('.', $block_id);
 +      return end($parts);
 +    }, $block_ids);
 +
 +    // Iterate through potential IDs until we get a new one. E.g.
 +    // 'plugin', 'plugin_2', 'plugin_3', etc.
 +    $count = 1;
 +    $machine_default = $suggestion;
 +    while (in_array($machine_default, $block_ids)) {
 +      $machine_default = $suggestion . '_' . ++$count;
 +    }
 +    return $machine_default;
++=======
+     return $this->machineNameGenerator->getUniqueMachineName($suggestion);
++>>>>>>> df87c63266 (#76)
    }
πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

I'm working on this

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

I totally forgot to comment, but it was a pleasure to be part of that meeting.

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

I made the changes, It needs review

πŸ‡¦πŸ‡ͺUnited Arab Emirates schlaukopf Dubai

I will start working on this, I will create a new merge request to focus only on the lowercase instances of url.

Production build 0.69.0 2024