hi.
i set up a minimal commerce enviroment but, when i "Add to cart" a product, no system message appears.

i noticed, instead, that they all appear at once when i log in in the backend.
i have a "Display an Add to Cart message" rule configured but i guess this isn't the intended behavior, is it?

these are the commerce modules i installed:

  • commerce
  • commerce_addressbook
  • commerce_cart
  • commerce_checkout
  • commerce_checkout_redirect
  • commerce_customer
  • commerce_customer_ui
  • commerce_line_item
  • commerce_line_item_ui
  • commerce_order
  • commerce_order_ui
  • commerce_payment
  • commerce_payment_example
  • commerce_payment_ui
  • commerce_paypal
  • commerce_paypal_wpp
  • commerce_paypal_wps
  • commerce_price
  • commerce_product
  • commerce_product_pricing
  • commerce_product_pricing_ui
  • commerce_product_reference
  • commerce_product_ui
  • commerce_shipping
  • commerce_shipping_example
  • commerce_shipping_ui
  • commerce_tax
  • commerce_tax_ui
  • commerce_ui
  • rules
  • addressfield

thanks a lot.

Comments

rszrama’s picture

Category: bug » support
Status: Active » Closed (cannot reproduce)

I've never seen this problem before, so it's likely a side effect of one of your contributed modules or some odd configuration on the site. There's no reason for that message not to be immediately displayed, but I'd recommend turning on the Rules logger to see if you can find anything out there. May be some weird caching thing, too, queueing messages up in a session that never gets attached to a user or something. Not sure, but there's not much more I can really offer.

lorenx’s picture

thanks for your answer.
i turned on rules debug, i hope you can give this log a glimpse to check if you see something wrong...
i asked in the #drupal channel and it seems there are other people with the same problem (hope to bring them here).
can i investigate further?
thanks a lot!

this is "add to cart" debug log:

" Reacting on event After adding a product to the cart.
  0 ms Reacting on event After adding a product to the cart.
  0.428 ms Evaluating conditions of rule Display an Add to Cart message.
  0.437 ms AND evaluated to TRUE.
  " Rule Display an Add to Cart message fires.
    0 ms Rule Display an Add to Cart message fires.
    0.17 ms Evaluating the action commerce_cart_add_to_cart_message.
    0.663 ms Rule Display an Add to Cart message has fired.
  1.186 ms Evaluating conditions of rule Reset the cart order status on product add or remove.
  1.193 ms AND evaluated to TRUE.
  " Rule Reset the cart order status on product add or remove fires.
    0 ms Rule Reset the cart order status on product add or remove fires.
    0.183 ms Evaluating the action commerce_order_update_status.
    0.908 ms Rule Reset the cart order status on product add or remove has fired.
  2.133 ms Finished reacting on event After adding a product to the cart.

and this is the complete debug log:

" Reacting on event Calculating the sell price of a product.
  0 ms Reacting on event Calculating the sell price of a product.
  5.411 ms Evaluating conditions of rule Calculate taxes: Sales tax.
  5.423 ms AND evaluated to TRUE.
  " Rule Calculate taxes: Sales tax fires.
    0 ms Rule Calculate taxes: Sales tax fires.
    5.387 ms Evaluating the action commerce_tax_calculate_by_type.
    5.997 ms Rule Calculate taxes: Sales tax has fired.
  11.518 ms Evaluating conditions of rule Calculate taxes: VAT.
  11.526 ms AND evaluated to TRUE.
  " Rule Calculate taxes: VAT fires.
    0 ms Rule Calculate taxes: VAT fires.
    0.193 ms Evaluating the action commerce_tax_calculate_by_type.
    " Executing rule Calculate Iva.
      0 ms Executing rule Calculate Iva.
      0.211 ms Evaluating conditions of rule Calculate Iva.
      0.219 ms AND evaluated to TRUE.
      " Rule Calculate Iva fires.
        0 ms Rule Calculate Iva fires.
        0.209 ms Evaluating the action commerce_tax_rate_apply.
        0.449 ms Rule Calculate Iva has fired.
      0.716 ms Finished executing of rule Calculate Iva.
    2.437 ms Rule Calculate taxes: VAT has fired.
  14.057 ms Evaluating conditions of rule Unset the price of disabled products in the cart.
  15.09 ms The condition data_is_empty evaluated to TRUE
  15.099 ms AND evaluated to FALSE.
  15.115 ms Finished reacting on event Calculating the sell price of a product.
" Reacting on event After updating an existing commerce order.
  0 ms Reacting on event After updating an existing commerce order.
  0.296 ms Evaluating conditions of rule Delete shipping line items on shopping cart updates.
  0.786 ms The condition data_is evaluated to TRUE
  1.412 ms The condition data_is evaluated to TRUE
  1.43 ms AND evaluated to FALSE.
  1.448 ms Finished reacting on event After updating an existing commerce order.
" Reacting on event After adding a product to the cart.
  0 ms Reacting on event After adding a product to the cart.
  0.428 ms Evaluating conditions of rule Display an Add to Cart message.
  0.437 ms AND evaluated to TRUE.
  " Rule Display an Add to Cart message fires.
    0 ms Rule Display an Add to Cart message fires.
    0.17 ms Evaluating the action commerce_cart_add_to_cart_message.
    0.663 ms Rule Display an Add to Cart message has fired.
  1.186 ms Evaluating conditions of rule Reset the cart order status on product add or remove.
  1.193 ms AND evaluated to TRUE.
  " Rule Reset the cart order status on product add or remove fires.
    0 ms Rule Reset the cart order status on product add or remove fires.
    0.183 ms Evaluating the action commerce_order_update_status.
    0.908 ms Rule Reset the cart order status on product add or remove has fired.
  2.133 ms Finished reacting on event After adding a product to the cart.
" Reacting on event Calculating the sell price of a product.
  0 ms Reacting on event Calculating the sell price of a product.
  5.438 ms Evaluating conditions of rule Calculate taxes: Sales tax.
  5.45 ms AND evaluated to TRUE.
  " Rule Calculate taxes: Sales tax fires.
    0 ms Rule Calculate taxes: Sales tax fires.
    5.346 ms Evaluating the action commerce_tax_calculate_by_type.
    5.956 ms Rule Calculate taxes: Sales tax has fired.
  11.504 ms Evaluating conditions of rule Calculate taxes: VAT.
  11.512 ms AND evaluated to TRUE.
  " Rule Calculate taxes: VAT fires.
    0 ms Rule Calculate taxes: VAT fires.
    0.214 ms Evaluating the action commerce_tax_calculate_by_type.
    " Executing rule Calculate Iva.
      0 ms Executing rule Calculate Iva.
      0.212 ms Evaluating conditions of rule Calculate Iva.
      0.22 ms AND evaluated to TRUE.
      " Rule Calculate Iva fires.
        0 ms Rule Calculate Iva fires.
        0.211 ms Evaluating the action commerce_tax_rate_apply.
        0.457 ms Rule Calculate Iva has fired.
      0.722 ms Finished executing of rule Calculate Iva.
    2.653 ms Rule Calculate taxes: VAT has fired.
  14.259 ms Evaluating conditions of rule Unset the price of disabled products in the cart.
  15.283 ms The condition data_is_empty evaluated to FALSE
  15.913 ms The condition entity_has_field evaluated to TRUE
  16.658 ms The condition data_is evaluated to FALSE
  16.666 ms AND evaluated to FALSE.
  16.685 ms Finished reacting on event Calculating the sell price of a product.
" Reacting on event Calculating the sell price of a product.
  0 ms Reacting on event Calculating the sell price of a product.
  0.179 ms Evaluating conditions of rule Calculate taxes: Sales tax.
  0.188 ms AND evaluated to TRUE.
  " Rule Calculate taxes: Sales tax fires.
    0 ms Rule Calculate taxes: Sales tax fires.
    0.084 ms Evaluating the action commerce_tax_calculate_by_type.
    0.141 ms Rule Calculate taxes: Sales tax has fired.
  0.368 ms Evaluating conditions of rule Calculate taxes: VAT.
  0.375 ms AND evaluated to TRUE.
  " Rule Calculate taxes: VAT fires.
    0 ms Rule Calculate taxes: VAT fires.
    0.077 ms Evaluating the action commerce_tax_calculate_by_type.
    " Executing rule Calculate Iva.
      0 ms Executing rule Calculate Iva.
      0.171 ms Evaluating conditions of rule Calculate Iva.
      0.178 ms AND evaluated to TRUE.
      " Rule Calculate Iva fires.
        0 ms Rule Calculate Iva fires.
        0.079 ms Evaluating the action commerce_tax_rate_apply.
        0.287 ms Rule Calculate Iva has fired.
      0.513 ms Finished executing of rule Calculate Iva.
    0.734 ms Rule Calculate taxes: VAT has fired.
  1.149 ms Evaluating conditions of rule Unset the price of disabled products in the cart.
  1.283 ms The condition data_is_empty evaluated to TRUE
  1.29 ms AND evaluated to FALSE.
  1.302 ms Finished reacting on event Calculating the sell price of a product.
" Reacting on event Calculating the sell price of a product.
  0 ms Reacting on event Calculating the sell price of a product.
  0.197 ms Evaluating conditions of rule Calculate taxes: Sales tax.
  0.207 ms AND evaluated to TRUE.
  " Rule Calculate taxes: Sales tax fires.
    0 ms Rule Calculate taxes: Sales tax fires.
    0.094 ms Evaluating the action commerce_tax_calculate_by_type.
    0.153 ms Rule Calculate taxes: Sales tax has fired.
  0.4 ms Evaluating conditions of rule Calculate taxes: VAT.
  0.408 ms AND evaluated to TRUE.
  " Rule Calculate taxes: VAT fires.
    0 ms Rule Calculate taxes: VAT fires.
    0.071 ms Evaluating the action commerce_tax_calculate_by_type.
    " Executing rule Calculate Iva.
      0 ms Executing rule Calculate Iva.
      0.164 ms Evaluating conditions of rule Calculate Iva.
      0.172 ms AND evaluated to TRUE.
      " Rule Calculate Iva fires.
        0 ms Rule Calculate Iva fires.
        0.077 ms Evaluating the action commerce_tax_rate_apply.
        0.276 ms Rule Calculate Iva has fired.
      0.494 ms Finished executing of rule Calculate Iva.
    0.713 ms Rule Calculate taxes: VAT has fired.
  1.16 ms Evaluating conditions of rule Unset the price of disabled products in the cart.
  1.307 ms The condition data_is_empty evaluated to TRUE
  1.315 ms AND evaluated to FALSE.
  1.327 ms Finished reacting on event Calculating the sell price of a product.
lorenx’s picture

Status: Closed (cannot reproduce) » Needs review

let me reopen this issue...

lorenx’s picture

Status: Needs review » Closed (works as designed)

sorry, i investigated further and it seems i have the same issue calling drupal_set_message() directly.
thank you for your attention.