🇫🇷France @aiphes

Account created on 25 March 2009, about 16 years ago
#

Recent comments

🇫🇷France aiphes

Hello,
I agree with the non intuitive setting to display image style for a media image library item.
The setting by the admin/structure/media/manage/image/form-display is an issue too, because it affect all images from media library..instead of setting image style (and more) for media fields into content type separately.
I guess there are some modules to avoid this and make it more easy to use, because it's a no go for non drupal aficionados :/

🇫🇷France aiphes

So I update and I apply the patch after ?

🇫🇷France aiphes

Now the line change: {% include directory ~ '/includes/regions_inc/inc_region_zone_3.html.twig' %}

and my include is :

{% if region_Zone_3 is not empty %}
  <div {{ noderegion_attribute.addClass(noderegion_classes,region3_classes).setAttribute('id', 'region-zone-3') }}>
    {{ region_Zone_3 }}
  </div>
  <!-- /#region-zone_3 -->
{% endif %}
🇫🇷France aiphes

Done.

- Downgrading drupal/link_attributes (2.0.1 => 1.14.0) then I need to run a clear cache and disabled link_attributes_menu_link_content because of:

 [error]   (Currently using Module manquant ou invalide Le module suivant est marqué comme installé dans la configuration
core.extension mais est manquant :
 * link_attributes_menu_link_content

After that, I can export my config as usual. Actually, Feeds module doesn't allow me to use PHP8 so I can upgrade the module since Feeds does.

🇫🇷France aiphes

After a test, it seem I need to add the GA4 ID to get it work.

🇫🇷France aiphes

Hello, this explain why it's impossible to update HAL too.
drupal/hal 1.0.3 2.0.1 Hypermedia Application Language (HAL)

🇫🇷France aiphes

The thing is that my website run PHP 8.1.6, but drush doesn't use this version, and use the global PHP that's in 7.4 ( webhosting setting). So I can use the last version but I can't remove this warning since I modify the global PHP.

🇫🇷France aiphes

Hello

Still there, so which version can we use on D9.5.10 ?
[error] ParseError: syntax error, unexpected '|', expecting ';' or '{' in Composer\Autoload\includeFile() (line 22 of /home/www/xx/sited9/web/modules/contrib/fixed_block_content/src/Normalizer/BlockContentNormalizer.php) #0 /home/www/xx/sited9/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/home/...')

Thanks

🇫🇷France aiphes

- Upgrading drupal/single_content_sync (1.3.15 => 1.3.16)
Seem to work: Configure "Export content" action applied to the selection

🇫🇷France aiphes

Hi,
So what can I do ? patch the module ?

🇫🇷France aiphes

So, I don't have the good debug code I guess, because no information about the fields. Here is my code:

<ol>
  {% for key, value in _context %}
    <li>{{ key }}</li>
  {% endfor %}
</ol>

{{ dump(_context|keys) }}

{{ dump(page) }}
<h2> Debug des variables</h2>
{{ vardumper() }}
🇫🇷France aiphes

Ok will do that and do feedback. Thanks for your advice.

🇫🇷France aiphes

Thanks to #19. It works for the beta9.
Search Custom Search (custom_search) Enabled 8.x-1.0-beta9

modules/contrib/custom_search$ curl https://www.drupal.org/files/issues/2023-04-24/custom_search-2885485-19.patch | git apply
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18063  100 18063    0     0  42601      0 --:--:-- --:--:-- --:--:-- 42601
🇫🇷France aiphes

Hello,

Same here after update on D9.5.9:

Parse error: syntax error, unexpected '|', expecting ';' or '{' in /home/www/sited9/web/modules/contrib/fixed_block_content/src/Normalizer/BlockContentNormalizer.php on line 22

Rollback to previous for the moment.
Downgrading drupal/fixed_block_content (1.2.0 => 1.1.0)

🇫🇷France aiphes

@amh5514 on how page are you talking about ?

🇫🇷France aiphes

Thanks Marios, but I don't understand anymore. Some says patch isn't a good way, prefer using settings.php only, others say patch is needed. :/

🇫🇷France aiphes

With Custom Search (custom_search) Enabled 8.x-1.0-beta9 , suggestion disappear.
Do I need to repatch ?

🇫🇷France aiphes

The issue seem to come from the pattern beahaviour.
I need to recreate them to get back my checkbox onto the edit form. Perhaps it is the result of a bad config import ?

🇫🇷France aiphes

@rgpublic after done an update - Upgrading drupal/core (9.5.3 => 9.5.7) and disable settings.local before, it seem to work without 500 errors on known pages. Your tips seem to be the real fix :)

🇫🇷France aiphes

Issue here on D9.5.7:

The DOMPurify library is not installed. The Colorbox module uses this library to sanitize HTML captions. Without this library, all captions will be treated as plain text. If you intend to have HTML captions in Colorbox content, download the DOMPurify library, extract it, and copy the dist directory into the /libraries/DOMPurify folder in your Drupal installation directory. Specifically, the system looks for /libraries/DOMPurify/dist/purify.min.js.

with this:

ibraries/DOMPurify$ ls -la dist/
total 668
drwxrwxr-x 2 provence-formation-php7 provence-formation-php7    216 Mar 23 20:40 .
drwxrwxr-x 3 provence-formation-php7 provence-formation-php7     26 Mar 28 15:03 ..
-rw-rw-r-- 1 provence-formation-php7 provence-formation-php7  64456 Mar 23 20:40 purify.cjs.js
-rw-rw-r-- 1 provence-formation-php7 provence-formation-php7 120024 Mar 23 20:40 purify.cjs.js.map
-rw-rw-r-- 1 provence-formation-php7 provence-formation-php7  64445 Mar 23 20:40 purify.es.js
-rw-rw-r-- 1 provence-formation-php7 provence-formation-php7 120021 Mar 23 20:40 purify.es.js.map
-rw-rw-r-- 1 provence-formation-php7 provence-formation-php7  67531 Mar 23 20:40 purify.js
-rw-rw-r-- 1 provence-formation-php7 provence-formation-php7 120028 Mar 23 20:40 purify.js.map
-rw-rw-r-- 1 provence-formation-php7 provence-formation-php7  22938 Mar 23 20:40 purify.min.js
-rw-rw-r-- 1 provence-formation-php7 provence-formation-php7  89510 Mar 23 20:40 purify.min.js.map
🇫🇷France aiphes

ok you're talking about views settings. So I know about it, and classes are already added to the list, even if in this case it's about un list from a basic block.

Anyway, I can't add classes to HTML elements via templates, block , block content or field ones as I would. Via JS, cache and templates  ( not more precise like id or name) disable class application.

Actually, I need more precise template suggestion for blocks, fields and views. Then, more HTML granularity to apply classes to precise elements.

This is an example about template suggestion I actually get for a view:

<!-- FILE NAME SUGGESTIONS:
x views-view-list--formations-2019.html.twig
x views-view-list--formations-2019.html.twig
x views-view-list--formations-2019.html.twig
* views-view-list.html.twig
-->

or a block:

<!-- FILE NAME SUGGESTIONS:
* block--LogoPart--logopartenairesfxb.html.twig
* block--LogoPart.html.twig
* block--LogoPart--fixed-block-content--logopartenairesfxb.html.twig
* block--LogoPart--logopartenairesfxb.html.twig
* block--LogoPart--fixed-block-content.html.twig
* block--LogoPart.html.twig
* block--.html.twig
* block--logopartenairesfxb.html.twig
* block--fixed-block-content--logo-partenaires-fb.html.twig
* block--fixed-block-content.html.twig
* block--fixed-block-content.html.twig
x block.html.twig
-->

For views,it's too generical, for blocks, I'm unable to access to content with the provided code.

🇫🇷France aiphes

About the point 1, where can I set this in the UI ? 

🇫🇷France aiphes

SO I need to replace 

{{ list.attributes.addClass(LISTE_classes) }} 

by

{{ create_attribute().addClass(['my-class-1', 'my-class-2']) }}

but this doesn't work, so I don't undertsand the difference.

{% set liste_attributes = create_attribute() %}
{% set liste_classes = [
'grix xs1 md8 lg12'
]%}
<{{ list.type }}{{ list.attributes.addClass(liste_classes) }}>
🇫🇷France aiphes

Another use case, in views template.

I can't add a class to the UL because of this:

  <{{ list.type }}{{ list.attributes.addClass(LISTE_classes) }} >
    {% for row in rows %}
      <li{{ row.attributes }} {{ITEMLISTE_attribute.addClass(ITEMLISTE_classes)}}>
        {{- row.content -}}
      </li>
    {% endfor %}
  </{{ list.type }}>

list.type isn't an HTML element. Perhaps can I use the list.attributes to add classes ?

🇫🇷France aiphes

Hello,

Trying to get it working on D9.5, but where can I found the blocks like slogan or logo ?
Other Blockify (blockify) Enabled

Thanks

🇫🇷France aiphes

Hello

Only this code in the template ?

🇫🇷France aiphes

I am a little bit annoyed because I think we are polluting this thread with other concerns

Totally right :) ;)

🇫🇷France aiphes

@DuneBL But I don't know where are stored patches. I've nothing in the ~/patchs folder :/ I go to ask to my web host.

🇫🇷France aiphes

@DuneBL Trying to rollback and it doesn't work
/sited9$ patch -p0 -R < "https://git.drupalcode.org/project/drupal/-/merge_requests/1943.diff" or

/sited9/web$ patch -p0 -R < "https://git.drupalcode.org/project/drupal/-/merge_requests/1943.diff"

give
-bash: https://git.drupalcode.org/project/drupal/-/merge_requests/1943.diff: No such file or directory

🇫🇷France aiphes

Suscribe to this, it's very complicated to add Classes to expression or elements / sub-elements.

🇫🇷France aiphes

@rgpublic ok, I will plan to use the settings.php and see after the future update ( that will drop the patch) , my 500 errors still goes out. Finger cross.

🇫🇷France aiphes

@rgpublic So you tell that we doesn't need to use settings.local.php on production websites ?
Because I do this every time, whithout issues except this one after migrating from D6 or D8 to D9.

🇫🇷France aiphes

ok, but I get errors of syntax:

 "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            },
		"file-mapping": {
             "[web-root]/robots.txt": false,
			 "[web-root]/sites/default/default.*": false
			}
        },
		"patches": {
			"drupal/core": {
				"Patch pour Premature end of script headers - 2844620": "https://git.drupalcode.org/project/drupal/-/merge_requests/1943.diff"
			}
		}
    },
 "./composer.json" does not contain valid JSON
  Parse error on line 290:
  ...   ]        }    },    "require-dev":
  --------------------^
  Expected: 'EOF'
🇫🇷France aiphes

Hi,

So @captain hindsight , do it be necessary to patch to get views template suggestions with display id or just adding code into .theme file ? Something like:
$suggestions[] = 'views_view__' . $variables['view']->id(). '__' . $display['id'];

🇫🇷France aiphes

@DuneBL & @charginghawk
Thanks for your help, patch seem to fix my random 500 error on editing certain content types. Hope this is durable. I will do the same on my others D9 websites.
Will I need to repatch after core updating in future ?

🇫🇷France aiphes

Hello
I'm facing off this on D9.5.3, do I need to patch ? if yes, which files ?

Thanks

🇫🇷France aiphes

Still there.
On anothers websites, I get the checkbox unchecked by default...So I need to check it to get my url rewriting to work back..
Annoying.

🇫🇷France aiphes

Hi,
As in #47, I still get this error with WSOD. v 8.x-1.0-alpha4

The website encountered an unexpected error. Please try again later.
ValueError: realpath(): Argument #1 ($path) must not contain any null bytes in realpath() (line 139 of core/lib/Drupal/Core/File/FileSystem.php).
realpath('') (Line: 139)
Drupal\Core\File\FileSystem->realpath('') (Line: 395)
Drupal\mimemail\Utility\MimeMailFormatHelper::mimeMailFile(NULL, '', 'google_analytics_audience-_-_brise-lames.pdf', 'application/pdf', 'attachment') (Line: 216)
Drupal\mimemail\Utility\MimeMailFormatHelper::mimeMailHtmlBody('
    Mime Mail message template
        test envoi pj
', 'Poste recherché dans le domaine [webform_submission:webform:element:poste_recherche:raw]', , 'test envoi pj
', Array) (Line: 206)
Drupal\mimemail\Plugin\Mail\MimeMail->prepareMessage(Array) (Line: 105)
Drupal\mimemail\Plugin\Mail\MimeMail->format(Array) (Line: 43)
Drupal\mailsystem\Adapter->format(Array) (Line: 289)

Do I need to patch the module or something else ?
Thanks

🇫🇷France aiphes

ok, now I need to get sending email to work again. :/

🇫🇷France aiphes

Done with - Upgrading drupal/symfony_mailer (1.2.0-beta3 => 1.2.0-rc1) , do I need to patch or can I use it with webform as is ?

🇫🇷France aiphes

Hi,

ok #20 📌 Support Symfony Mailer for attachments and deprecate Swiftmailer Closed: won't fix , I'll patch the symfony mailer module with the dedicated patch that you provide.

🇫🇷France aiphes

Still there on D9.5.3, PHP 8.1.
Redirect 404 (redirect_404) Enabled 8.x-1.8
Deprecated function : mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated dans Drupal\redirect_404\EventSubscriber\Redirect404Subscriber->onKernelException() (/home/xxx/www/xx/sited9/web/modules/contrib/redirect/modules/redirect_404/src/EventSubscriber/Redirect404Subscriber.php ligne 108)

🇫🇷France aiphes

Hello,

After enabled , I get this error too:

>  [success] Successfully enabled: jquery_ui_draggable
$ drush @sited9pf pml --filter=drag
 ----------- ------------------------------------------- ---------- ---------
  Package     Name                                        Status     Version
  jQuery UI   jQuery UI Draggable (jquery_ui_draggable)   Enabled    8.x-1.5

Result on:
Deprecated function : dirname(): Passing null to parameter #1 ($path) of type string is deprecated dans Drupal\Core\Extension\ExtensionPathResolver->getPath() (/home/xxx/www/xxx/sited9/web/core/lib/Drupal/Core/Extension/ExtensionPathResolver.php ligne 85)

D953 + PHP 8.1.6

Thanks

🇫🇷France aiphes

OK, I enabled the module:

  jQuery UI   jQuery UI Draggable (jquery_ui_draggable)   Disabled   8.x-1.5
 ----------- ------------------------------------------- ---------- ---------
$ drush @sited9pf en -y jquery_ui_draggable
>  [success] Successfully enabled: jquery_ui_draggable
$ drush @sited9pf pml --filter=drag
 ----------- ------------------------------------------- ---------- ---------
  Package     Name                                        Status     Version
 ----------- ------------------------------------------- ---------- ---------
  jQuery UI   jQuery UI Draggable (jquery_ui_draggable)   Enabled    8.x-1.5

Will see if warning disappear. Finger cross. ;)

🇫🇷France aiphes

Hello,

Facing the same on D9.5.3 + filefield_sources versions : * 1.x-dev, with:

The website encountered an unexpected error. Please try again later.
Error: Cannot use object of type Drupal\Core\Entity\Entity\EntityFormDisplay as array in Drupal\filefield_sources\Controller\ImceController->page() (line 45 of modules/contrib/filefield_sources/src/Controller/ImceController.php).
Drupal\filefield_sources\Controller\ImceController->page('node', 'fiche_bts', 'field_detail_fiche_bts', Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
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: 182)
Drupal\cleantalk\EventSubscriber\BootSubscriber->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: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 713)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Do I need to patch ?
Thanks

🇫🇷France aiphes

hello;
With no patch I get:
<code> Deprecated function : str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated dans Cleantalk\Common\Firewall\Modules\Sfw->diePage() (/home/xxx/www/xxx/sited9/web/modules/contrib/cleantalk/lib/Cleantalk/Common/Firewall/Modules/Sfw.php ligne 398)

D9.5.3 + CleanTalk 9.2.2
Do I need to wait for an update or do I apply the patch ?

Thanks

🇫🇷France aiphes

Still on D9.5.3, need to stay on 1.2
require drupal/coffee:1.2

🇫🇷France aiphes

Right. But why disclaim to don't use it ?

🇫🇷France aiphes

Update to Entity Update (entity_update) 3.0.0-rc2 seem to be the right way for D9.5.3

🇫🇷France aiphes

So, we need to wait for an update of the core ? I just start to update to 9.5.3 my websites and the error is still here:
User warning: The following theme is missing from the file system: jquery_ui_draggable in Drupal\Core\Extension\ExtensionPathResolver->getPathname() (line 63 of core/lib/Drupal/Core/Extension/ExtensionPathResolver.php).

🇫🇷France aiphes

Steps to reproduce:
1- Migrate website to D8 or D9 from D6, with CCK managed fields
2- Edit the "admin/structure/types/manage/TYPE/form-display", and enable or disable field about language or metatag
3- Then go to edit a node of this type, and this lead to 500 error ( view mode for authentificated user) or error message

🇫🇷France aiphes

Here we are :)
Will see if info about dependency on deprecated theme will be added so. Cross finger.

🇫🇷France aiphes

Hi,

It was those of my custom theme:

themes/custom/provform-d9-2021/logo.svg
themes/custom/provform-d9-2021/favicon.ico

Since, I change the admin theme Claro for Adminimal, with default settings, and it go as designed.
On some others websites with Claro, default settings doesn't work, I need to give the path to favicon and logo. But it isen't the reason whay I get 500 error on authentified mode.

🇫🇷France aiphes

Thanks for #8. Perhaps it could be useful to add an indication on appearance page and/or Drush about this dependance ?

Have a good day.

🇫🇷France aiphes

Here the other part of the page.

🇫🇷France aiphes

I click on the link "Disable", and after that the theme stay in active ones, but the link "Disable" disappear.

🇫🇷France aiphes

This part ?

/**
 * A custom theme for the offline page:
 *
 * This applies when the site is explicitly set to maintenance mode through the
 * administration page or when the database is inactive due to an error.
 * The template file should also be copied into the theme. It is located inside
 * 'core/modules/system/templates/maintenance-page.html.twig'.
 *
 * Note: This setting does not apply to installation and update pages.
 */
# $settings['maintenance_theme'] = 'bartik';
🇫🇷France aiphes

Hi
@jmohino I've not noticed this, but I get some 500 errors in addition when authentified. But not related I think.

🇫🇷France aiphes

Another error:

The website encountered an unexpected error. Please try again later.
Error: Cannot use object of type Drupal\Core\Entity\Entity\EntityFormDisplay as array in Drupal\filefield_sources\Controller\ImceController->page() (line 45 of modules/contrib/filefield_sources/src/Controller/ImceController.php).
Drupal\filefield_sources\Controller\ImceController->page('node', 'fiche_bts', 'field_detail_fiche_bts', Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
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: 182)
Drupal\cleantalk\EventSubscriber\BootSubscriber->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: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 713)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
🇫🇷France aiphes

On D9.5.2 and D8.9, seem to work:

composer2 show drupal/shs
name     : drupal/shs
versions : * 2.0.x-dev, * dev-2.0.x
type     : drupal-module

Git issue probably.
Regards

🇫🇷France aiphes

I'm using Claro for now, perhaps it helps ?
After visiting the admin/config/search/metatag/settings , I unchecked some boxes for the incrimined content type.

🇫🇷France aiphes

Hello.
What kind of infos do you need more ? I guess it could be related to my 500 errors as authentified user.

Production build 0.71.5 2024