0

I have inherited a site to finish that is proving to be difficult. There is a specific set of product pages that are not inheriting the theme set in the admin panel. I have checked all of the layout.xml files and nothing is set there. I have switched themes to make sure it's not theme-specific, and the issue remains. I installed CommerceBug, turned on profiling, you name it.

I looked through the list of options n98-magerun offers and noticed database logging. Turned that on and checked the output when I finally got a hit. See below:

SQL: SELECT `layout_update`.`xml` FROM `cart1_core_layout_update` AS    `layout_update`
 INNER JOIN `cart1_core_layout_link` AS `link` ON link.layout_update_id=layout_update.layout_update_id WHERE (link.store_id IN (0, :store_id)) AND (link.area = :area) AND (link.package = :package) AND (link.theme = :theme) AND (layout_update.handle = :layout_update_handle) ORDER BY `layout_update`.`sort_order` ASC
BIND: array (
  ':store_id' => '2',
  ':area' => 'frontend',
  ':package' => 'default',
  ':theme' => 'contest',
  ':layout_update_handle' => 'THEME_frontend_default_contest',
)

For reference, this is what it looks like for other pages:

SQL: SELECT `layout_update`.`xml` FROM `cart1_core_layout_update` AS `layout_update`
 INNER JOIN `cart1_core_layout_link` AS `link` ON link.layout_update_id=layout_update.layout_update_id WHERE (link.store_id IN (0, :store_id)) AND (link.area = :area) AND (link.package = :package) AND (link.theme = :theme) AND (layout_update.handle = :layout_update_handle) ORDER BY `layout_update`.`sort_order` ASC
BIND: array (
  ':store_id' => '2',
  ':area' => 'frontend',
  ':package' => 'ultimo',
  ':theme' => 'default',
  ':layout_update_handle' => 'default',
)

I have no clue where those values are being set. I've checked the core_layout_link and core_layout_update tables but they are empty. Any ideas?

2
  • 1
    Have you checked the Design tab within the product edit screen? If it's not in the default scope, check the design tab within the scope of your store view. May 12 '16 at 7:00
  • Yeah. That was actually the first place I checked. I should've noted that in my initial description. Thanks Shawn. May 12 '16 at 14:23
0

The value THEME_frontend_default_contest comes from loadLayout() in the controller action. By default, Magento loads the default layout handle as well as a STORE_{store_id} and THEME_{area}_{package}_{theme} handle.

So this log is just evidence that the current theme is "default/contest" but it does not explain, why.

If it's really not a custom layout update in the product configuration, it's probably something in custom code.

Next step: Search for "contest" in app/code and in the core_config_data database table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.