Account created on 31 July 2018, over 6 years ago
#

Merge Requests

More

Recent comments

We are still facing the unable to modify issue : once I quit the media settings, I can no longer view the active Image in the sidebar again and all I have is a field with "Add media" button

1. Currently the dialog height is set to be 700px fixed. In Media Library UI its set to 75%. If the content of the dialog is less than configured height, it's changed to auto. I think that's a buggy behaviour since height is basically working as maxHeight, but makes it hard for use cases like this when we have iframes. I opened https://www.drupal.org/project/drupal/issues/3480282 🐛 The configured dialog height is overrided to be auto Active , but maybe someone have a better workaround in mind then just a fixed height.

Media Library UI is by default set to 75%, the parent iFrame is not which then result in Dialog using the bar minimum height. Instead of playing with Media Library UI configuration, we should set the parent iFrame to a fixed height and width (I only fixed the height for the moment) to the best possible value.

3. Instead of overriding media_library.ui, we can create a new "wrapper" route and do the overrides on them, this will allows us to only override in XB context.

I created a route as suggested by John, this help reduce commited changes.

Hi,

I had to synchronise 0.x and this branch before working on this issue (they moved many files and HOOKs and they switched to xb_stark).

I commited the changes, and added an up-to-date screenshot to this comment

DONE:
- add to the UI a way to select the recipes, a hard coded list to start, which provides values added to install parameters

TODO:
- add a new script which can find the available recipes and dynamically list them in the UI, I think this can be a follow up

DONE:
- reads the recipes from the install parameters
- verify recipe added

TODO:
- add to the UI a way to select the recipes, a hard coded list to start, which provides values added to install parameters
- add a new script which can find the available recipes and dynamically list them in the UI, I think this can be a follow up

Update the code to use drupal_cms_blog for now, I also refactored the message to use the default from RecipeRunner

It output the below for now, but we can fix that later

Installed <em class="placeholder">Better Exposed Filters</em> module.

DONE:
- we need an "apply recipes" script, like the install and login script
- take the new pre installed test and run that script

TODO:
- reads the recipes from the install parameters
- verify recipe added
- add to the UI a way to select the recipes, a hard coded list to start, which provides values added to install parameters
- add a new script which can find the available recipes and dynamically list them in the UI, I think this can be a follow up

I updated the tests to include the new recipe.phpcode.

The recipe seems to be working fine, yet I have a small issue

+ <link rel="canonical" href="http://localhost:3000/cgi/drupal/">
+ <link rel="shortlink" href="http://localhost:3000/cgi/drupal/">
+ <meta name="referrer" content="unsafe-url">
+ <meta name="rights" content="Copyright &copy;2024 All rights reserved.">
+ <meta property="og:site_name" content="Drupal CMS">
+ <meta property="og:type" content="website">
+ <meta property="og:url" content="http://localhost:3000/cgi/drupal/node">
+ <meta name="twitter:card" content="summary_large_image">
+     <title>| Drupal CMS</title>

title is missing title.

  title: '[node:field_seo_title|node:title] | [site:name]'

This is the recipe configuration

Using batch operations, I was able to install the blog recipe.

I see some small issues in console on json_decode level that I might need to fix before pushing the test


use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;
use Drupal\Core\Recipe\Recipe;
use Drupal\Core\Recipe\RecipeRunner;

$stdErr = fopen('php://stderr', 'w');

set_error_handler(function (...$args) use ($stdErr, &$errors) {
    fwrite($stdErr, print_r($args, 1));
});

$flavor = file_get_contents('/config/flavor.txt');
$docroot = '/persist/' . $flavor;

chdir($docroot . '/web');

$class_loader = require $docroot . '/vendor/autoload.php';

$request = Request::create("/cgi/$flavor/", 'GET', [], [], [], [
  'HTTP_HOST' => $install_params['host'] ?? 'localhost',
  'REMOTE_ADDR' => '127.0.0.1',
  'SCRIPT_FILENAME' => "/persist/$flavor/web/index.php",
  'SCRIPT_NAME' => "/cgi/$flavor/index.php"
]);
$kernel = DrupalKernel::createFromRequest($request, $class_loader, 'prod');
$kernel->boot();
$kernel->loadLegacyIncludes();

$container = $kernel->getContainer();
$container->get('request_stack')->push($request);

$container->get('module_handler')->loadAll();

/** @var \Symfony\Component\HttpFoundation\Session\Session $session */
$session = $container->get('session');
$session->start();
$request->setSession($session);

$recipe = Recipe::createFromDirectory($docroot . '/web/recipes/drupal_cms_blog');

foreach (RecipeRunner::toBatchOperations($recipe) as $operation) {
  $batch['operations'][] = $operation;
}

foreach ($batch['operations'] as $operation) {
  [$function, $arguments] = $operation;

  // Execute each batch operation directly
  try {
      call_user_func_array($function, $arguments);
  } catch (Exception $e) {
    print json_encode([
        'message' => $e->getMessage(),
        'type' => 'error',
    ], JSON_THROW_ON_ERROR) . PHP_EOL;
  }
}

print json_encode([
  'message' => 'Beginning install tasks',
  'type' => 'recipes',
], JSON_THROW_ON_ERROR) . PHP_EOL;

I used the UI for testing locally, I think I'm only missing the validation code and I should have all tasks ready

RecipeCommand will just prevent us from getting the progress and other informations (it use it's own output buffer - symfony)

Do you think executing batch directly in our .phpcode file would be much better ?

<?php

use Drupal\Core\Recipe\RecipeRunner;

$stdErr = fopen('php://stderr', 'w');

set_error_handler(function (...$args) use ($stdErr, &$errors) {
fwrite($stdErr, print_r($args, 1));
});

$flavor = file_get_contents('/config/flavor.txt');
$docroot = '/persist/' . $flavor;

chdir($docroot . '/web');

$class_loader = require $docroot . '/vendor/autoload.php';

use Drupal\Core\Recipe\Recipe;

$recipe = Recipe::createFromDirectory($docroot . '/web/recipes/drupal_cms_blog');

foreach (RecipeRunner::toBatchOperations($recipe) as $operation) {
$batch['operations'][] = $operation;
}

print json_encode([
'message' => $output->fetch(),
'type' => 'recipes',
], JSON_THROW_ON_ERROR) . PHP_EOL;

This is the code I'm using

...
$command = new RecipeCommand($class_loader);

$input = new ArrayInput(['path' => $docroot . '/web/recipes/drupal_cms_blog']);
$output = new BufferedOutput();

$command->run($input, $output);

print json_encode([
  'message' => $output->fetch(),
  'type' => 'recipes',
], JSON_THROW_ON_ERROR) . PHP_EOL;

I'm running into a small issue

Uncaught (in promise) TypeError: asyncifyStubs.posix_spawnp is not a function
    at _posix_spawnp (php-worker.mjs:9:312063)
    at php-worker.mjs.wasm:0x5dca76
    at php-worker.mjs.wasm:0x8b77e6
    at php-worker.mjs.wasm:0x6d8005
    at php-worker.mjs.wasm:0x39a346
    at php-worker.mjs.wasm:0xb248ab
    at ret.<computed> [as dynCall_vii] (php-worker.mjs:9:379933)
    at invoke_vii (php-worker.mjs:9:695383)
    at php-worker.mjs.wasm:0x726849
    at php-worker.mjs.wasm:0x2fa550
_posix_spawnp @ php-worker.mjs:9
$func4294 @ php-worker.mjs.wasm:0x5dca76
$func6680 @ php-worker.mjs.wasm:0x8b77e6
$execute_ex @ php-worker.mjs.wasm:0x6d8005
$zend_execute @ php-worker.mjs.wasm:0x39a346
$dynCall_vii @ php-worker.mjs.wasm:0xb248ab
ret.<computed> @ php-worker.mjs:9
invoke_vii @ php-worker.mjs:9
$zend_eval_stringl @ php-worker.mjs.wasm:0x726849
$zend_eval_string @ php-worker.mjs.wasm:0x2fa550
$dynCall_iiii @ php-worker.mjs.wasm:0xb2450a
ret.<computed> @ php-worker.mjs:9
invoke_iiii @ php-worker.mjs:9
$pib_run @ php-worker.mjs.wasm:0x2fa73e
ret.<computed> @ php-worker.mjs:9
Module._pib_run @ php-worker.mjs:9
ccall @ php-worker.mjs:9
_run @ PhpBase.mjs:186

Working on the 1st task

- "apply recipes" script, like the install and login script, which reads the recipes from the install parameters

If I understand correctly, we need to set-up a new file apply-recipes.phpcode, which should be called in the test phase.

The file should apply a recipe (drupal_cms_blog for exemple)

Currently, recipes can be applied using a PHP Command (when I go to Browse projects and select a recipe it show me the below)

cd /var/www/html/web
/usr/bin/php /var/www/html/web/core/scripts/drupal recipe /var/www/html/drupal_cms_blog

checking the source code of the drupal scripts, I was able to write the below

use Drupal\Core\Recipe\RecipeCommand;

$stdErr = fopen('php://stderr', 'w');

set_error_handler(function (...$args) use ($stdErr, &$errors) {
    fwrite($stdErr, print_r($args, 1));
});

$flavor = file_get_contents('/config/flavor.txt');
$docroot = '/persist/' . $flavor;

chdir($docroot . '/web');

$class_loader = require $docroot . '/vendor/autoload.php';

$command = new RecipeCommand($class_loader);

$command->run($input, $output);

Am I doing this right @mglaman ? Thank you

Yes, I will be happy to continue working on this under your lead

@mglaman done.

I added a new file trial/tests/cgi-preinstalled.test.js with tests from the old one (I removed the install-site.phpcode part and updated the site name)

Update

I ended up adding trial-uninstalled.zip to artifacts entry so test job can download it, and run the installation process.

the two tests cgi-interactive-install.test.js, cgi-install.test.js were using trial.zip, and now that we changed it's name to trial-uninstalled.zip I updated both jobs

You were right about not seeing "database exists" error

the path in CI is different

  'database' => '/builds/issue/drupal_cms-3478858/trial/build/web/core/db.sqlite',

Because in CI we are not using DDEV

The task that get skipped is

    'install_download_translation' => [
      'run' => $needs_download ? INSTALL_TASK_RUN_IF_REACHED : INSTALL_TASK_SKIP,
    ],

And we will also need to remove that part in this case, I think

It should respond with

AssertionError: expected '{"message":"<ul>\n<li>To start over, …' to deeply equal '{"message":"Performing install task (…'

Expected: "{"message":"Performing install task (14 \/ 14)","type":"install"}"
Received: "{"message":"<ul>\n<li>To start over, you must empty your existing database and copy <em>default.settings.php<\/em> over <em>settings.php<\/em>.<\/li>\n<li>To upgrade an existing installation, proceed to the <a href=\"\/update.php\">update script<\/a>.<\/li>\n<li>View your <a href=\"http:\/\/:\">existing site<\/a>.<\/li>\n<\/ul>","type":"error"}"

Okey, I will continue looking

https://git.drupalcode.org/issue/drupal_cms-3478858/-/jobs/3149845

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
FAIL tests/cgi-install.test.js > install-site.phpcode > installs the site from the artifact

Expected: "{"message":"Performing install task (14 \/ 14)","type":"install"}"
Received: "{"message":"Performing install task (13 \/ 13)","type":"install"}"

Should we just change the expected to 13 instead of 14, or are we missing something ?

Okey, I understand you don't want to break the default trial.zip, only the trial-installed.zip should have that change

Okey, I will try updating the build-trial command

REPLACING
composer config --merge --json 'extra.drupal-scaffold.file-mapping' '{"[web-root]/sites/default/default.settings.php": {"append": "./scaffold/default.settings.php"}}'
WITH
composer config --merge --json 'extra.drupal-scaffold.file-mapping' '{"[web-root]/sites/default/settings.php": "./scaffold/default.settings.php"}'

I run into the SQLite file path issue too

I fixed it manually be setting database to core/db.sqlite instead of the auto-generate drush path

$databases['default']['default'] = array (
  'database' => 'core/db.sqlite',
  'prefix' => '',
  'driver' => 'sqlite',
  'namespace' => 'Drupal\\sqlite\\Driver\\Database\\sqlite',
  'autoload' => 'core/modules/sqlite/src/Driver/Database/sqlite/',
);

+1 for Content Entity Clone, we will need to create a feature request in the module issues queue :

+ When you click to clone an entity, the module redirect you to /{entity}/add/{entity_type}?content_entity_clone={entity_id} and show you the source entity data (depends on the configuration)
- Status = Published, This need to be changed following @pameeela request and Status should be Unpublished by default
- Missing a button "Clone" in Primary tabs / Local tasks

++ Thankfully this issue helped improve ECA a new issue ( #3481200 ECA Render: add support for local tasks ECA Render: add support for local tasks Active ) was resolved.

For anyone running into the prb

Warning: Undefined array key "styles" in Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin->getDynamicPluginConfig() (line 99 of core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ListPlugin.php).

Just loop on each of your CKEditor format Basic HTML, ... and click Save to trigger an update to your configuration

styles: true should be added to every settings.plugins.ckeditor5_list.properties

I'm sure that can be done using the Update hook, I will check it another time

Space between blocks on the left side (top/bottom of Add new).

Hi !

Can we fix the spacing issues, and if yes should this be addressed in dashboard contrib module or core Layout Builder module ?

If WASM implementation includes a password reset feature why don't we just stick to the old fashion: show a link to Password Reset.

The block by default should display the user name, and a link to edit the user profile. And if it's the 1st visite after installation we add a message in the middle where we ask the user to reset his password (knowing that in WASM we might not be able to send that link in an email).

I'm new to this, so pardon me If I'm out of scope.

I will let you check before I continue with the tests writing.

Thank you Adam,

Hi Adam,

I added https://testing-library.com/docs/cypress-testing-library/intro/ which help filling inputs using findBy to find a specific input in the page (e.g: findByLabelText('Path'))

Hi !

I applied @phenaproxima suggestions, I also added drupal_cms_blog to project_browser settings

More issues that will need to be resolved before removing drupal_cms_blog from the default recipe:

  1. move config > actions > node.type.blog to drupal_cms_blog, currently it reside in drupal_cms
  2. same for config > actions > user.role.content_editor > grantPermissionsForEachTaxonomyVocabulary, because it depend on core/recipes/tags_taxonomy which is part of drupal_cms_blog (This prevent running into undefined plugin issue)

Hi @pameeela, we have a fixture that auto-populate content-type blog with data and that fixture live outside drupal_cms_blog

drupal_cms/content/node/e939b485-ca10-4061-9036-3d6d394d7214.yml
...
  field_description:
    -
      value: "Imagine traveling to a place no one has ever been before, far away from home. That's what space exploration is all about. We want to learn more about planets, moons, and stars, and see what secrets they hold."
...

in order to remove drupal_cms_blog, we need to move that file from drupal_cms into drupal_cms_blog

Hi @pameeela, @l_vandamme (sorry for taking over)

I didn't add a MR until I check if it's okey for both of you

+ I replaced both field_description and field_content with body.
+ I also updated view blog page and RSS.

Feel free to ignore my fork if it doesn't respond well to your requirements.

Hi @pameeela,

field_description is used in both blog view page and RSS configuration. And the field_content doesn't have a Summary option that can replace it

Hi @kristen, @longwave

The issue is much bigger than just a CSS/JS loading. @longwace MR will help us build a demo for the upcoming event, and in the meantime I will try to continue with the ajax_page_state approche to resolve the whole issue.

1. Media Library duplicate JS/CSS files, which result in overriding definition (Yes! when Media Library load ajax.js, it automatically erase every definition in dialog.ajax.js - therefore openDialog become undefined and nothing happen on ajax)
2. We can filter existing JS, but then LoadJS library does throw an issue when we pass an empty Array.

-- longwave MR resolve these two

3. Wim suggested that we use ajax_page_state, we need it's logic to skip loading an existing library JS/CSS. But this conflict with Radix state.
4. AjaxResponseAttachmentsProcessor return empty Ajax settings after inserting a Media just because all JS/CSS files are already downloaded.
5. Fied media is not yet supported in Experience Builder (uploading an image might result in it not show up in Preview)

and now it seems like we have new issues with Select too (like we did with Textarea before)

This is the small piece of code that I added to web/core/lib/Drupal/Core/Ajax/AjaxResponseAttachmentsProcessor.php

    // Issue #3472900 by kristen pol: XB props form hanging for SDDS components
    $found = false;
    foreach ($commands as $entry) {
      if (isset($entry["command"]) && $entry["command"] === "settings") {
        $found = true; break;
      }
    }
    if (!$found) {
      array_unshift($commands, [
        'command' => 'settings',
        'settings' => $assets->getSettings(),
        'merge' => true,
      ]);
    }

Hi everyone, I recorded a demo (Four columns with Cards)

- https://youtu.be/IVyarGnVZOQ

We still have a small issue with Media widget (already addressed in #3473155 https://www.drupal.org/project/experience_builder/issues/3473155 📌 Redux Sync all single-value types in the SDC test all props form Fixed - but they only added a warning about it in console warns "The field media does not yet support updating the preview on change. It will soon.")

I think I have a fix for that, but for now I went with a small trick to skip it (Uploading a new image in the media - Clicking outside the Card - re-click again on the Card and change the title if you want)

I'm playing manually again, after uploading an Image in the 1st Icon Card, I add a 2nd Icon Card to the page and before adding a media, I go to web/core/lib/Drupal/Core/Ajax/AjaxResponseAttachmentsProcessor.php:

I comment the code

//    ->setAlreadyLoadedLibraries(isset($ajax_page_state['libraries']) ? explode(',', $ajax_page_state['libraries']) : [])

and I add these at the end

    unset($commands[1]);
    unset($commands[2]);
    return $commands;

this help me load the settings in the Ajax response + Removing the JS/CSS (they were already loaded in the 1st component edit)

and things work just fine.

Now I need to figure out how to do this programmatically

Hi @wim leers, I added ajax_page_state as you suggested

        "ajax_page_state[libraries]": drupalSettings.ajaxPageState?.libraries,

I added only libraries (adding theme result in an issue - I don't think we need it)

I added setTimeout (because I found out they use it also for Drupal object + It help trigger the functions inside only after page load = until drupalSettings is defined)

** web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php will decompress the string

and then it's up to XBEndpointRenderer to remove the existing CSS/JS from the Array

I still have an issue, Media Library doesn't open - I think it's related to the #2 issue ('insert' doesn't get triggered in ajax.js)

A little update

Textarea + Image fix are no more needed (this was resolved in #3473155 📌 Redux Sync all single-value types in the SDC test all props form Fixed )

I will update the PR

// *** HOW TO RESOLVE THE ISSUE MANUALLY *** //

1 // Add an Icon Card and upload an Icon
2 // Now add an Icon Card (but don't open the Contextual Panel)
Go to web/modules/contrib/experience_builder/src/Render/MainContent/XBEndpointRenderer.php, both response->headers->set('Attach-Css', ... and response->headers->set('Attach-Js', ... should be commented (else XB will load the ajax.js a 2nd time which will result in ajaxCommands being override and we will lose the openDialog function definition, this will break the Media functionnalities for the new Icon Card)
3 // Now youn can safely open the Contextual Panel (but don't click the Add Media just yet)
Go to web/core/lib/Drupal/Core/Ajax/AjaxResponseAttachmentsProcessor.php, and update the setAlreadyLoadedLibraries replace the args with an empty array and then you can click Add Media and everything will work fine

      ->setAlreadyLoadedLibraries([])

// *** WHAT NOW *** //

I think @wim leers suggestions will resolve the 1st issue, I will work on that. Then we will need to find out how to resolve the 2nd issue

2nd issue explanation: When Ajax load the necessary JS/CSS for the Media Library widget, it try to skip loaded libraries but then If no JS get loaded Ajax skip also the drupalSettings part :/ (Yes he do - ajax return only $response->getCommands() which concatenate js_assets_footer, js_assets_header, and css_assets what about $attachments['drupalSettings'] = $assets->getSettings())

Hi !

I was able to insert component on top/bottom / recording: https://youtu.be/PGjod3DfBl0

I run into an issue with empty columns, when I try to drop the component on top of it, it keep moving between the top of the component and the inside.

Some context //

This issue is not related to redux (redux show the spinner, because the ajax.js stuck)

When you open a component contextual panel, it try to load JS/CSS dependencies (dialog.js, ...etc)

If two components depend on the same JS, what should happen ?

1/ only load the dependencie one-time, but this will not trigger Drupal.attachBehaviors :/
2/ load the dependencie twice, this will result in a JS file being included two times and will break the click trigger
3/ load the dependecie once, and execute the Drupal.attachBehaviors (something doesn't seem right - the contextual panel stuck at the 1st component props form)

Hi @wim leers

I think we will run into a missing piece even after decompressing the libraries / the output will have names likes: core/ajax, ...etc

Redux might not understand those entries.

Can you please direct me into the correct ghin to do ^^

Hi @wim leers

I tried getting the libraries and running UrlHelper::compressQueryParameter to compress them so we can attach them to the response:

    if ($libraries = $assets->getLibraries()) {
      $libraries = UrlHelper::compressQueryParameter(implode(',', $this->dependencyResolver->getMinimalRepresentativeSubset($libraries)));
      $response->headers->set('Attach-Libraries', $libraries);
    }

What do you think ? We should decompress them on the processResponseAssets.ts level, do you think this is possible ?

Hi @wim leers

I was able to reproduce the issue just by inserting one Icon Card in the existing Two Columns.

I added a simple test, that only check if clicking on that Icon Card will show the right props form / Currently, it show the Image props form instead of the Icon Card props form

props are not hanging anymore, but we still need to figure why the Card Item doesn't get updated (Preview)

Finally, I was able to trace this (well the issue was there all the time "loadjs")

// JS

when you open a 2nd Icon Card, it try to load the same JS libraries that were loaded before. This throw an error, because we have a function that filter the JS array and only load the new JS - and it send an empty string which break loadjs

// CSS

LoadJS throw the below error (not sure why they couldn't add an explanation -_-)

  // throw error if bundle is already defined
  if (bundleId) {
    if (bundleId in bundleIdCache) {
      throw "LoadJS";
    } else {
      bundleIdCache[bundleId] = true;
    }
  }

Source code: https://github.com/kubetail-org/loadjs/blob/main/src/loadjs.js#L248

UPDATE

once I commented the below in createApi the issue is gone

      transformResponse: processResponseAssets,

Hi !

It looks like we have an issue on Redux level, after I click on the 2nd Card Item. Redux stuck at status: "pending"

Hi, I know this issue is postponed for now

but while working on a different issue 3472900 🐛 XBEndpointRenderer & processResponseAssets() do not support `ajaxPageState` ⇒ duplicate CSS/JS loading Fixed , I did run into this too and I was able to found some interesting things

setFormState was settings image to '' (empty string) because the prior state had an entry xb_component_props[9acb612e-748c-4f69-b07e-66b95e5d173e][image][media_library_selection]

Javascript while running the below, replace the entry image with image: ''

          setFormState((prior: object) => {
            // Use the "checked" property when present so the value is boolean.
            // Additional prop types might require similar type conversion so
            // don't be shocked if it becomes trickier than just this ternary.
            const newState = { ...prior, [target.name]: value };
            storeUpdateCallback(newState);
            return newState;
          });

Hi @kisten,

I was able to solve some of the issues

1. [image] String value found, but an object is required

setFormState was settings image to '' (empty string) because the prior state had an entry xb_component_props[9acb612e-748c-4f69-b07e-66b95e5d173e][image][media_library_selection]

2. Textarea

Textarea wasn't getting updated, I found out that the onChange (from InputBehaviors) doesn't get triggered. I updated the code (+ added value because textarea have an entry value on the properties level)

This still doesn't resolve the issue with multiple instances of Card Icon. And another interesting issue, image doesn't get updated in the preview -_-

I'm sorry for not moving everything into the same issue, but as you know you need to have the #3472634 fix just to scroll to Icon Card and I don't think we can rebase on 3 differents issues just to have the ability to test and resolve this one.

Hi kristen,

Looking at the Network logs, when you drag a new "Icon Card" and you upload a new file (JPG), the preview get updated with no issue. But right after I change the title It throw an issue

The website encountered an unexpected error. Try again later.<br><br><em class="placeholder">Drupal\Core\Render\Component\Exception\InvalidComponentException</em>: [image] String value found, but an object is required in <em class="placeholder">Drupal\Core\Theme\Component\ComponentValidator-&gt;validateProps()</em> (line <em class="placeholder">203</em> of <em class="placeholder">core/lib/Drupal/Core/Theme/Component/ComponentValidator.php</em>). <pre class="backtrace">Drupal\Core\Template\ComponentsTwigExtension-&gt;doValidateProps() (Line: 109)

Payload (after changing title field)

{"name":"Icon Card","image":{"alt":"Alternative text ","width":1280,"height":853,"src":"/sites/default/files/2024-09/banner-4887650_1280_1.jpg"},"title":"User-centric experiences","summary":"Create compelling content on more  devices than ever. With tools to build versatile, structured content and integrate with a wide array of digital marketing channels.","randomProp":"random"}

Payload

{"name":"Icon Card","image":"","title":"User","summary":"","randomProp":"random"}

Hi @balintbrews,

Looking at the code, modifierKeyPressedRef use modifierKeyPressed which is defined as 'ctrl' key

useHotkeys('ctrl', () => setModifierKeyPressed(true), {
    keydown: true,
    keyup: false,
  });

which mean this will be trigged when you hold ctrl, same goes for the code I removed.

It get triggered on e.ctrlKey.

The 1st one dispatch canvasViewPortZoomIn/Out, the 2nd one dispatch canvasViewPortZoomDelta

I recorded a video:
https://www.loom.com/share/96870c8622d244ff8cc29d7b1b23614e?sid=eb4e63ff-f8ad-4b0e-99d9-07e3acdca371

The above should resolve the issue.

1. Allow default scrolling behavior


        } else {
          e.preventDefault();
          if (canvasPaneRef.current) {
            canvasPaneRef.current.scrollTop += e.deltaY;
            canvasPaneRef.current.scrollLeft += e.deltaX;
          }
        }

2. There was an issue with zoom in/out because the event was triggered two times - so I had to remove the 2nd call


        if (e.ctrlKey) {
          e.preventDefault();
          dispatch(canvasViewPortZoomDelta(e.deltaY));
        }

Hello, Thank you everyone for the fixe.

Yes, Drag & Drop work very good, I can put elements in One/Two columns with no issue.

Hi everyone,

I might be wrong :) but I suppose One column / Two column don't work for now.

Only "Fake Section 2" works, you can drag & drop inside of it but you can't do the same inside a new One/Two column.

Record: https://www.loom.com/share/d567c2e86af54edea1e6c51b5e307476?sid=5ad28362...

** when I drag a component the left/right side of the new Two column, the sidebar on the left doesn't get updated. Which mean after the next change, everything will go back to normal.

Hi !

I don't think Window will help resolving the Toast issue, to resolve that issue we will need to set the toast to position: absolute; and add a parent with position: relative;

Do you still need the Window component to be created ?

Hi !

I was able to resolve the issue using the !important prefix for class "container", I updated the PR.

- https://tailwindcss.com/docs/configuration#important

Hi Michael,

I applied the required modifications

I added new

  • 1 col/region
  • 2 cols/regions
  • 3 cols/regions
  • 4 cols/regions

Hello Pierre, Michael,

While CSS Grid is highly powerful, it has certain limitations, especially with older browsers. According to Can I use, there are issues with Safari's support for grid-template-rows, and Edge has problems with calc().

Key Question: Will websites be primarily accessed by developers with up-to-date browsers, or by a much large audience?

For Drupal sites, the answer is often clear. Given that Drupal is frequently used for government, healthcare, higher ed sites, it’s likely that these sites need to be accessible to individuals using older machines or browsers.

Recommendation:

I created a new PR, and I also uploaded a patch for those who need it.

Thank you.

Hi,

After this change, a lot of people seems to run into this issue

InvalidArgumentException: The callable definition provided "[Drupal\claro\ClaroPreRender,tablePositionSticky]" is not a valid callable. in Drupal\Core\Utility\CallableResolver->getCallableFromDefinition() (line 69 of core/lib/Drupal/Core/Utility/CallableResolver.php).

Is there any solution for it ?

Thank you

Hi !

I have an Image field

When I click on "Add media", everything work fine. (AJAX method:POST, +body)
Yet, when I click on 2 page, some CSS files get duplicated (AJAX method:GET, /views/ajax?ajax_form=1&_wrapper_format=drupal_ajax&media_library_opener_id=media_library.opener.field_widget&media_library_allowed_types%5Bimage%5D=image&media_library_selected_type=image&media_library_remaining=1&media_library_opener_parameters%5Bfield_widget_id%5D=field_header_image&media_library_opener_parameters%5Bentity_type_id%5D=node&media_library_opener_parameters%5Bbundle%5D=landing_page&media_library_opener_parameters%5Bfield_name%5D=field_header_image&media_library_opener_parameters%5Bentity_id%5D=61&media_library_opener_parameters%5Brevision_id%5D=602&hash=UKwOcmFbHRZjHy8K2RGIpvoJ470tuc09Sqv-J-z3q4k&_wrapper_format=drupal_ajax&view_name=media_library&view_display_id=widget&view_args=image&view_path=%2Fnode%2F61%2Fedit&view_base_path=admin%2Fcontent%2Fmedia-widget&view_dom_id=33bbb2ceb9faf3a9cfafa5af89dff0d0bd09bf0616791c92f9ac57209695b194&pager_element=0&ajax_form=1&_wrapper_format=drupal_ajax&media_library_opener_id=media_library.opener.field_widget&media_library_allowed_types%5Bimage%5D=image&media_library_selected_type=image&media_library_remaining=1&media_library_opener_parameters%5Bfield_widget_id%5D=field_header_image&media_library_opener_parameters%5Bentity_type_id%5D=node&media_library_opener_parameters%5Bbundle%5D=landing_page&media_library_opener_parameters%5Bfield_name%5D=field_header_image&media_library_opener_parameters%5Bentity_id%5D=61&media_library_opener_parameters%5Brevision_id%5D=602&hash=UKwOcmFbHRZjHy8K2RGIpvoJ470tuc09Sqv-J-z3q4k&page=1&_drupal_ajax=1&ajax_page_state%5Btheme%5D=claro&ajax_page_state%5Btheme_token%5D=idizCV_HO1lV4Z6IJOQkPtrXzf9q0EQhfp4qAw0QE6g&ajax_page_state%5Blibraries%5D=eJx9k212pSAMhjeEsoZZiSdCqsxFwgnB1ll9oxXveDvTPxieN5gPAvglpEGI4ghsz28vjGjgv1I_04ockmCSu9vxLZdzcJTMGKYhh4y2GWass3UUibsc3APZuAhM1nPNEPsEaycwlpNOkUaIXZEthjSdcEEfYIhhZOCtlxkXPJVEHrs34sW4pQwaf09yKFtyVo0g2ynuwodUiC3sk3Qa6FF-djkrVCfGJoOTsOJx-s6rkKMlRxS8CdqDCLncYREQLDek3YjoGabvlLFkSkXjfmlJi4MY_qDxuKJmvq9Xtm8Box_m4D2m9pu_mTpEfAoRza3RtoYX8B78hKIw1aGGdvLcmv0urltV22TQIhjyXBp-kqN9WsrPTmfADDI_VZkPsPe5ZcSaJqOT5tT2_TGupszE4uolt70p5ALEoVWpc2C_o3PghB7axmM1L8_kdd9jcZDx1xFcqO5CZVMLcktht48HU8wa8L3YY-3hN3zcwEK-6sVsBEXnGsle1vBV27-UfTY-ARLshj4)

While debugging, I found that $ajax_page_state is NULL :/

class AjaxResponseAttachmentsProcessor implements AttachmentsResponseProcessorInterface {
  ..
  protected function buildAttachmentsCommands(AjaxResponse $response, Request $request) {
    $ajax_page_state = $request->get('ajax_page_state');

Hello,

Issuer shoudn't have a trailing slash at the END

https://www.linkedin.com/oauth/.well-known/openid-configuration
"issuer" : "https://www.linkedin.com",

https://accounts.google.com/.well-known/openid-configuration
"issuer": "https://accounts.google.com",

In our case

      'issuer' => trim(Url::fromUri('internal:/')->setAbsolute()->toString(), '/'),

should be replaced with

      'issuer' => trim(Url::fromUri('internal:/')->setAbsolute()->toString()),

Also, jwks_uri should be accessible to Anonymous users but settings _access: 'TRUE' is not enought. We need to alter some code in the Controller handle() function

if (!$this->user instanceof TokenAuthUser) {
throw new AccessDeniedHttpException('This route is only available for authenticated requests using OAuth2.');
}

should be removed

Hi Chetan,

Unfortunately, your commit removed the fix :/

      if (count($display_id) !== count($count_view)) {

This should be replaced by

      if (count($display_id) !== $count_view) {

We are already have count in the Controller which call the Service

# src/Controller/ViewsAutocompleteApiController.php
    $display_ids = $this->viewsAutocompleteManager->getViewsDisplayId($display_id, count($view_name));

# /Service/ViewsAutocompleteApiManager.php
  public function getViewsDisplayId($display_id, $count_view) {
    if (!empty($display_id)) {
      $display_id = explode(',', $display_id);
      if (count($display_id) !== count($count_view)) {

I also added view permission, it should be a custom permission instead of true by default :)

Hi everyone, I would suggest the following hook to update your database

** you should replace N by 8002, 9002
** after adding ->setRevisionable(TRUE), old users must re-install the module :/ which is not good (data loss). We should't add a hook to update table for old users

function translatable_menu_link_uri_update_N() {
  $database = \Drupal::database();

  $columns_schema = [
    'link_override__uri' => [
      'type' => 'varchar',
      'length' => 2048,
      'not null' => FALSE,
      'description' => 'The URI of the link.',
    ],
    'link_override__title' => [
      'type' => 'varchar',
      'length' => 255,
      'not null' => FALSE,
      'description' => 'The link text.',
    ],
    'link_override__options' => [
      'type' => 'blob',
      'not null' => FALSE,
      'size' => 'big',
      'description' => 'Serialized array of options for the link.',
    ],
  ];

  foreach ($columns_schema as $field_name => $column_schema) {
    // Create fields if they don't already exist.
    if (!$database->schema()->fieldExists('menu_link_content_field_revision', $field_name)) {
      $database->schema()
        ->addField('menu_link_content_field_revision', $field_name, $column_schema);
    }
  }
}

Production build 0.71.5 2024