After upgrading this module my site shows the next error:

Warning: Illegal offset type in ds_preprocess_ds_layout() (line 415 of modules/contrib/ds/ds.module).

I saw the file and the problem i think that is the array passed as second parameter:

$url = \Drupal::service('token')->replace($layout_settings['link_custom'], array($layout_settings => $variables['content']['#' . $entity_type]), array('clear' => TRUE));

These line must be:

$url = \Drupal::service('token')->replace($layout_settings['link_custom'], array($entity_type => $variables['content']['#' . $entity_type]), array('clear' => TRUE));

But if i change it the module return an fatal error when generate the URL string because there are internal and external links and the fromUri function is set to "internal" only.

If someone need more info please let me now.

Comments

jncruces created an issue. See original summary.

razunter’s picture

...and bug is still here :/

EricLemieux’s picture

StatusFileSize
new1.16 KB

I had a similar issue and created a patch that worked for me based on your comments.

swentel’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
Status: Active » Needs review

Let's see what the bot thinks.

aspilicious’s picture

to avoid confusion we shoudl rename entity_type to entity_type_id but that's a different issue...

swentel’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Ok, nothing breaks, we need tests :)

swentel’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new5.06 KB

Actually, I can live without tests you know. Patch fixing that key + rename.

  • swentel committed e1b0d99 on 8.x-3.x
    Issue #2824892 by swentel, EricLemieux: Warning: Illegal offset type in...
swentel’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.