Hello,
A quick question for the Ubercart experts.
In:
uc_cart_view()
Residing in:
ubercart/uc_cart/uc_cart.pages.inc
I have noticed that the breadcrumb is set quite late in the function, after the argument count sanity check and empty cart check.
- The argument count check immediately returns MENU_NOT_FOUND, which presumably results in a 404 (am I right?)
- The empty cart check immediately returns an array('#theme' => 'uc_empty_cart');
The custom breadcrumb is set last, so if the two above conditions are met it will never be evaluated.
But, to me, it looks like the discriminator for the custom breadcrumb is independent of arguments passed and cart contents, so I am wondering if that code block should actually be set earlier in the function (between or perhaps before these two above-mentioned checks)?
Here's the code, it appears to have no logical dependency on cart item count:
// Add a custom cart breadcrumb if specified.
if (($text = variable_get('uc_cart_breadcrumb_text', '')) !== '') {
$link = l($text, variable_get('uc_cart_breadcrumb_url', '<front>'));
drupal_set_breadcrumb(array($link));
}
Shouldn't this setting be evaluated regardless of arguments passed or an empty cart, or have I missed something?
g.
Recent comments
Thanks. openid_connect is actually a different beast than OpenID. I think the "connect" version implements an OpenID client to work on an Oauth server. Or something like that.
OpenID?
I think this alternative works too. Instead of installing the stub modules, you may be able to just insert the relevant records in the systems table (while also ensuring entity_plus and...
Entity_plus_custom with search api
This relates to a problem with creating a View of Projects on a site using MySQL >= 8.0.3 https://github.com/backdrop/backdrop-issues/issues/5795 I can't be at the meeting this...
Dec 5th Weekly Dev Meeting
Additionally, "outside" means a file that is located outside a module folder. The second parameter of module_load_include() is the name of a module, so, this function assumes that you are loading a...
How to include other files in module?
Yes, it does mean outside your functions. You can use module_load_include() within functions but not outside. The YouTube module gives an example: <?php /** * @file * Youtube field module adds...
How to include other files in module?