Pregunta

I have a Magento 1.9.3.0 test shop for which I've created a new theme based on rwd. This shop uses a database that's been cloned from the production environment (Magento 1.8.1.0). Everything works very well except this weird bug:

When I visit a product view page the package/theme gets reverted to base/default from rwd/myCustom.

If I go in Admin and edit the product I was looking at earlier and just hit "Save" or "Save and continue" even without making any change, then refresh the product page again, the correct theme appears (rwd/myCustom)

enter image description here

I don't have many products (~50) so I could just manually go through them and "fix" them but I am more curious what causes this.

  • None of the products have a custom design set.
  • I've cleared cache, re-indexed a bunch of times so it's not that.
  • I've checked under Systems > Design and there's are no entries there.
  • I've tried a mass attribute update (Select All > Actions: Update Attributes > Change an attribute for all products > Save) but that doesn't seem to fix anything.
  • Logs (magento & apache) show nothing when accessing "bugged" product pages

Programatically loading and saving a product doesn't fix it.

¿Fue útil?

Solución

I just figured it out!

Notes:

The old (production) site is running a package called oldtheme.
The new (development) site is running a theme called myCustom under the rwd package.

After digging through app/code/core/Mage/Core/Model/Design/Package.php and logging the designPackageExists function with Mage::log I've noticed that Magento was looking for an oldtheme package instead of rwd.

I did a search in the database and revealed that under catalog_product_entity_varchar there were a bunch of entries with the oldtheme/default value.
I tracked the entry's entity_type_id in the eav_attributes table and found that its corresponded to the custom_design attribute (even though non of the products had a custom design set for any of the store views).

The fix was removing the offending entries from catalog_product_entity_varchar.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange
scroll top