Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I traced it to
line 20 of commerce_product_ui.module
20 foreach (commerce_product_types() as $type => $product_type) {
21 $items['admin/commerce/products/add/' . strtr($type, array('_' => '-'))] = array(
22 'title' => 'Create !name',
23 'title arguments' => array('!name' => $product_type['name']),
I tried fixing it with title_callback - no luck - but why is this happening after all ?
title and title arguments should be parsed by t() after all - see the api docs for hook_menu..
What is wrong here ?
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedNothing appears to be wrong - if you don't specify a 'title callback', it defaults to t(), so the arguments should work just fine. A quick local test shows it working as expected. Perhaps you have some module interacting with page titles or languages causing it to error?
Comment #2
rszrama CreditAttribution: rszrama commentedClosing for lack of more information.
Comment #3
marcvangendI had the same problem today, it turned out to be caused by the Administration Language module. Hope this helps someone debugging this in the future.
issue: #2490616: Administration Language breaks Commerce module's "Create Product" page
Comment #4
marcvangendI guess we can safely say that Commerce works as designed.