Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Php error resulting from carousel display config #179

Open
patdunlavey opened this issue Apr 27, 2022 · 4 comments
Open

Php error resulting from carousel display config #179

patdunlavey opened this issue Apr 27, 2022 · 4 comments
Assignees
Labels
Check Reproducibility Basically if we can make things fail in the same way the user did Drupal YAML files Drupal settings provided by our deployment Drupal9 Drupal9 is the new Drupal8 which was the new Drupal7 wich was the... enhancement New feature or request External Bug Some package, dependency needs some Pet Friendly Bug controll
Milestone

Comments

@patdunlavey
Copy link
Contributor

Seeing a lot of these:
TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given in array_search() (line 470 of /var/www/html/web/modules/contrib/ds/ds.module)

I tracked this down to drupal/config/sync/core.entity_view_display.node.digital_object.digital_object_image_only_for_carousel.yml wherein we see this:

...
  layout:
    id: ds_1col
    library: null
    disable_css: true
...

The problem comes in ds.module:template_preprocess_ds_entity_view() where, if disable_css is true, then it expects a library to be attached to the build variable - which it is not.

This is probably a bug in ds, but we can avoid it by setting disable_css to false for this display. @DiegoPino or @alliomeria do you know if there is a reason why disable_css is set to true for this display and why it could not be changed to false?

@DiegoPino
Copy link
Member

Yes, DS bug. Might also be an old carried over configuration?
1.- Disabled CSS = TRUE no problem
2.- Maybe try regenerate this particular config (or any config) and see if the issue is actually our saved ymls and the module DOES add a library if we let it do it?

thx

@patdunlavey
Copy link
Contributor Author

I did regenerate the config and doing so did not add the library attribute, but did set disable_css to false.

@DiegoPino
Copy link
Member

Ok, so add disable_css=false to every view mode? We really do not depend on anything that DS provides styling wise, if you are OK.

@DiegoPino DiegoPino added enhancement New feature or request Drupal YAML files Drupal settings provided by our deployment Drupal9 Drupal9 is the new Drupal8 which was the new Drupal7 wich was the... Check Reproducibility Basically if we can make things fail in the same way the user did External Bug Some package, dependency needs some Pet Friendly Bug controll labels Apr 28, 2022
@DiegoPino DiegoPino added this to the 1.0.0 milestone Apr 28, 2022
@patdunlavey
Copy link
Contributor Author

It already is false in all other view modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Check Reproducibility Basically if we can make things fail in the same way the user did Drupal YAML files Drupal settings provided by our deployment Drupal9 Drupal9 is the new Drupal8 which was the new Drupal7 wich was the... enhancement New feature or request External Bug Some package, dependency needs some Pet Friendly Bug controll
Projects
None yet
Development

No branches or pull requests

2 participants