Hi all,

and thank you for a great theme. Really appreciate your work.

Working with your theme lately, I was unlucky enough to lose significant time on a (I suppose) naming convention bug. I created several layouts, in my_omega_subtheme/panels/layouts and within each folder I named each one templateX.layout.inc. The problem was that the omega_discovery function was searching for those files, because there is a parent function in omega.inc line 339 that calls: $layouts = omega_discovery('layout', FALSE);.

That result in duplicating my layouts. First as panel layouts and secondly as omega layouts. Is this the expected behaviour? If yes, we have to write it down somewhere for not letting anyone else falling in the same trap and losing his/hers time.

For the record, my workaround was to rename the layouts removing the layout string from the filenames and updating the database with a lazy UPDATE query.

UPDATE panels_display SET layout = REPLACE (layout, '.layout', '') WHERE layout LIKE '%.layout%'

After that everything works great and no duplicate layouts.

Thank you!

Comments

msmithcti’s picture

Status: Active » Fixed

I would have said this is expected behaviour. Maybe the .layout.inc extension is too generic but in the context of an Omega theme I wouldn't say it is. The naming convention for panels layouts is [layout-name].inc so there should be no conflicts there.

Status: Fixed » Closed (fixed)

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

joshua.boltz’s picture

I recently ran into this problem and discovered (after spending a good amount of time trying to track it down) that it was indeed the naming convention we used on a few panels layouts that were conflicting with Omega.

The naming convention was causing these warnings:
Notice: Undefined index: name in omega_panels_get_sublayouts() (line 55 of /var/www/truthinitiative.org/src/sites/all/themes/contrib/omega/omega/panels/layouts/omega/omega.inc).

Removing the .layout from the filename, such as landing.layout.inc to landing.inc solved the errors.