πŸ‡¨πŸ‡­Switzerland @Mistrae

Account created on 17 March 2014, over 10 years ago
#

Merge Requests

Recent comments

πŸ‡¨πŸ‡­Switzerland Mistrae

Thanks for the patch. We do not need the finalize transition either.

πŸ‡¨πŸ‡­Switzerland Mistrae

What I meant to say is, if on a website we have tabs for the user profile for commerce (example: orders and addresses), I don't want the customer to have the blue icon, I want it to have the standard tabs.

The cool editor tabs (aka blue button) should only appear to selected roles and not to the customer.

πŸ‡¨πŸ‡­Switzerland Mistrae

Since this problem comes from an outside library now used in core, should we fix this here ? Removing htmlentities() seems to fix the issue.

πŸ‡¨πŸ‡­Switzerland Mistrae

OK thanks, just to be clear, does that mean that since 10.2 we cannot use htmlentities with serialize and that will be considered as won't fix or should something be done here ?

πŸ‡¨πŸ‡­Switzerland Mistrae

If I input the text directly yes it work. Maybe it's the htmlentities that doesn't work with the new function.

πŸ‡¨πŸ‡­Switzerland Mistrae

Here is the full code that can recreate the error:

$html_dom = \Drupal\Component\Utility\Html::load(\Drupal\Core\Render\Markup::create('IdentitΓ©'));
$body = $html_dom->getElementsByTagName('body');
$node = $body->item(0);
$child = $node->childNodes->item(0);
$text = $child->textContent;
$text = htmlentities($text, ENT_QUOTES, 'UTF-8');
$element = $html_dom->createElement('a', $text);
$node->replaceChild($element, $child);
\Drupal\Component\Utility\Html::serialize($html_dom)
πŸ‡¨πŸ‡­Switzerland Mistrae

@longwave, serialize not normalize.

Ex.

DOMDocument with:

<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html>
    <html>
      <body>
        <a href="https://www.mywebsite.com/services/identite">Identit&eacute;</a>
      </body>
    </html>

Run Html::serialize and get:
<a href="https://www.mywebsite.com/services/identite">Identit</a>

πŸ‡¨πŸ‡­Switzerland Mistrae

I created a patch to revert the lastest change if anyone need it fixed before a better solution can be found.

πŸ‡¨πŸ‡­Switzerland Mistrae

It happen with drupal 10.2, rolling back to 10.1 fixes the problem. So I think we need to open a ticket on the core issues.

πŸ‡¨πŸ‡­Switzerland Mistrae

Had to switch isRenderedInCurrentRequest after getBasePath or it was always trigerred by isRenderedInCurrentRequest.

πŸ‡¨πŸ‡­Switzerland Mistrae

Can confirm the error disappear with this MR

πŸ‡¨πŸ‡­Switzerland Mistrae

Patch for core version 10 is anyone is interested

πŸ‡¨πŸ‡­Switzerland Mistrae

restarting apache did the trick for me

πŸ‡¨πŸ‡­Switzerland Mistrae

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

πŸ‡¨πŸ‡­Switzerland Mistrae

Patch #173 works well. On the contrary with MR 14, if I import 2 different nodes with same images and medias on 2 different modules, one node has no image.

πŸ‡¨πŸ‡­Switzerland Mistrae

Re-roll the path with lastest version (commerce_order_post_update_16 is now used)

πŸ‡¨πŸ‡­Switzerland Mistrae

Patch is working fine. Thanks.

πŸ‡¨πŸ‡­Switzerland Mistrae

The new determineErrorRedirect function (UserController.php) introduced in 9.5 throw an AccessDeniedHttpException if the user in not active. This should be addressed before merging anything.

πŸ‡¨πŸ‡­Switzerland Mistrae

Mistrae β†’ created an issue.

πŸ‡¨πŸ‡­Switzerland Mistrae

@berdir Any chance this can be commited soon ? There is so much error on PHP 8.1 without it, that it make this module almost unusable. Thanks.

Production build 0.69.0 2024