I wanted to theme a product display as described here http://drupal.org/node/1911600 and http://drupal.org/node/1844228 .

So I upgraded to commerce 7.x-1.5 ( datestamp = "1360749319" ) and this allows me to now theme the page by creating
a file in sites/default/templates/mytemplate/node--PRODUCT-tpl.php where PRODUCT is the machine name of the product.

With this update you get expected results for theming when you go to

/node/NODEID

where NODEID is the node of the product display. Works well.

However, now, when you go to

/admin/commerce/products/PID

where PID is the product ID you get the whitescreen of death (WSOD) and error messages

PHP Fatal error: Maximum execution time of 80 seconds exceeded in /XXX/commerce_kickstart-7.x-2.6/includes/database/log.inc on line 148
PHP Fatal error: Maximum execution time of 80 seconds exceeded in /XXX/commerce_kickstart-7.x-2.6/includes/database/database.inc on line 2197
PHP Fatal error: Maximum execution time of 80 seconds exceeded in /XXX/commerce_kickstart-7.x-2.6/modules/field/field.attach.inc on line 0
PHP Fatal error: Maximum execution time of 80 seconds exceeded in /XXX/commerce_kickstart-7.x-2.6/includes/database/log.inc on line 148

Note: even if the file node--PRODUCT-tpl.php has NOTHING in it except "Hello World" you still get this error.

PHP Fatal error: Maximum execution time of 80 seconds exceeded in /XXX/commerce_kickstart-7.x-2.6/modules/field/modules/text/text.module on line 155

Removing the file node--PRODUCT-tpl.php fixes the issue.

So clearly there is something going on with the newest version of commerce and theming that blows up commerce when it sees a theme node hint and tries to display the path admin/commerce/products/PID.

Comments

rszrama’s picture

Project: Commerce Core » Commerce Kickstart
Version: 7.x-1.5 » 7.x-2.x-dev
Component: Product » Code

I see that you're using Commerce Kickstart 2.x. That means the admin URLs you're visiting are in fact attempting to display node edit forms instead of the bare product entity form you'd get with just Drupal Commerce installed. This could be an issue with Kickstart 2.x or Inline Entity Form, not sure which.

rar’s picture

Status: Active » Closed (works as designed)

On further investigation ... There was an entity-reference field on the product with so many drop down entries it caused the page to time-out. While it is odd that this only happened to /admin/commerce/products/PID when node--PRODUCT-tpl.php exists (which shouldn't even be calling the template anyway?), it is manageable by changing the field from a drop-down widget to an autocomplete widget. Closing this as "works as designed"