I created a custom flexible layout with panels but it didn't show up. On line 817 of ds.module $layout['panels']['name'] is called but is not defined for custom flexible layouts in hook_ds_layout_info, I added a patch that fixes the problem. Don't forget to clear cache.

Comments

OnkelTem’s picture

StatusFileSize
new1.27 KB

Hahaha...
Same here. I've just created the patch with same fix )))
7 minutes difference :)

swentel’s picture

Status: Needs review » Fixed

Ah crap, stupid I forgot that one. Committed and pushed, thanks guys! Went for the first one, no real need to reassign $layout to $panels variable.

OnkelTem’s picture

Went for the first one, no real need to reassign $layout to $panels variable.

Of course. I just was trying to keep the comment - // We need the Panels plugin info array to ... :-)

binkerman’s picture

Hi Guys,
Sorry to bother you with this question but what do I do with that code in the patch? do I past this somewhere in an existing php file? or do I create a new one?

thanks

ruben

OnkelTem’s picture

what do I do with that code in the patch?

There is a program called 'patch' which is used to apply patches. If you have it in the PATH, then place .patch file in the root of the module Display Suite and type: patch -p1 < the_patch_file.patch and the patch will be applied.

do I past this somewhere in an existing php file?

This patch is very simple so you can apply modifications manually. All the information are in the patch file and almost self-explainning:

diff --git a/sites/all/modules/ds/ds.registry.inc b/sites/all/modules/ds/ds.registry.inc

it is about `ds.registry.inc` file, which is in root of the module

@@ -349,6 +349,7 @@ function _ds_ds_layout_info() {

locate line number 349, and in the function _ds_ds_layout_info()

             'label' => $layout['title'],
             'path' => $layout['path'],
             'module' => 'panels',
+            'panels' => $layout,
             'flexible' => TRUE,
             'regions' => $regions,
           );

add the line makred with "+" in the same place.

Good luck

binkerman’s picture

Thank you very much for the elaborate answer! I will install netbeans and apply the patch.
Have a nice day!

Ruben

Status: Fixed » Closed (fixed)

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