- Posts: 149
- Thank you received: 6
Error Notice in Order status notification Email
11 years 3 months ago - 11 years 3 months ago #206273
by icomex
Error Notice in Order status notification Email was created by icomex
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.28
-- Error-message(debug-mod must be tuned on) -- : Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /home/icxdev04/public_html/libraries/legacy/view/legacy.php on line 164
I notice this after the 2.5.0 update on a development site - but I am not certain whether it was there immediately before.
Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /home/icxdev04/public_html/libraries/legacy/view/legacy.php on line 164
I confirmed that I am using the default template for that email. It does not appear in other Order emails, including one which I customized. I am not sure how to correct this error, or even hide it without lowering the reporting error level.
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.28
-- Error-message(debug-mod must be tuned on) -- : Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /home/icxdev04/public_html/libraries/legacy/view/legacy.php on line 164
I notice this after the 2.5.0 update on a development site - but I am not certain whether it was there immediately before.
Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /home/icxdev04/public_html/libraries/legacy/view/legacy.php on line 164
I confirmed that I am using the default template for that email. It does not appear in other Order emails, including one which I customized. I am not sure how to correct this error, or even hide it without lowering the reporting error level.
Last edit: 11 years 3 months ago by icomex.
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206302
by Xavier
Replied by Xavier on topic Error Notice in Order status notification Email
Hi,
When is that message displayed ? In the email received by the customer ?
If you change the order status in the backend, and you enable the option to notify the customer, is that error displayed too ?
Could you try for testing purposes to add the line: define(JPATH_COMPONENT,'hikashop'); at the top of the preload part of the order status notification email ?
When is that message displayed ? In the email received by the customer ?
If you change the order status in the backend, and you enable the option to notify the customer, is that error displayed too ?
Could you try for testing purposes to add the line: define(JPATH_COMPONENT,'hikashop'); at the top of the preload part of the order status notification email ?
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206363
by icomex
Replied by icomex on topic Error Notice in Order status notification Email
It is in the customer notification email.
I will run the local status change test, and then add the line to the template preload and let you know what I learn. (I did verify that the template involved was using the declared 2.5.0 versions of the template code.)
I will run the local status change test, and then add the line to the template preload and let you know what I learn. (I did verify that the template involved was using the declared 2.5.0 versions of the template code.)
Please Log in or Create an account to join the conversation.
11 years 3 months ago - 11 years 3 months ago #206366
by icomex
Replied by icomex on topic Error Notice in Order status notification Email
Changing the status in the back end and sending a customer notification did not produce the error.
Immediately making another purchase displayed the error as expected. Apparently it only happens during the automated PayPal confirmation after a purchase.
Adding the suggested line to the preload section of the email template and making another purchase changed the error:
Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /home/icxdev04/public_html/media/com_hikashop/mail/order_status_notification.preload.modified.php on line 9
Line 9 being the line where I added the provided line of code.
Immediately making another purchase displayed the error as expected. Apparently it only happens during the automated PayPal confirmation after a purchase.
Adding the suggested line to the preload section of the email template and making another purchase changed the error:
Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /home/icxdev04/public_html/media/com_hikashop/mail/order_status_notification.preload.modified.php on line 9
Line 9 being the line where I added the provided line of code.
Last edit: 11 years 3 months ago by icomex.
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206406
by icomex
Replied by icomex on topic Error Notice in Order status notification Email
OK, I have made the error go away but I have absolutely no idea how. But it did use your suggested line of code.
I was thinking through the sequence of events during a purchase/paypal payment/confirmation/thanks page and decided the only non-Hika code running between handing off to PayPal and sending the notification email could be our own custom plugin, which has a call for onAfterOrderCreate and onAfterOrderUpdate triggers. Now nowhere in that plugin is there a usage of JPATH_COMPONENT. In fact, the onAfterOrderUpdate only calls the DBO object and issues two direct queries to the database. That's it. Over the entire plugin, it loads the application, it loads the user and it loads the DBO. Nothing else that even uses a path as far as I know.
But putting your line
at the top of the plugin has made the error go away.
I have no idea how or why. But maybe that will help you track down the weirdness.
I'll include the plugin file, just in case it helps.
I was thinking through the sequence of events during a purchase/paypal payment/confirmation/thanks page and decided the only non-Hika code running between handing off to PayPal and sending the notification email could be our own custom plugin, which has a call for onAfterOrderCreate and onAfterOrderUpdate triggers. Now nowhere in that plugin is there a usage of JPATH_COMPONENT. In fact, the onAfterOrderUpdate only calls the DBO object and issues two direct queries to the database. That's it. Over the entire plugin, it loads the application, it loads the user and it loads the DBO. Nothing else that even uses a path as far as I know.
But putting your line
Code:
define(JPATH_COMPONENT,'hikashop');
I have no idea how or why. But maybe that will help you track down the weirdness.
I'll include the plugin file, just in case it helps.
This attachment is hidden for guests.
Please log in or register to see it.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206402
by nicolas
Replied by nicolas on topic Error Notice in Order status notification Email
There is a typo in the code provided by Xavier.
Try like this instead:
define('JPATH_COMPONENT','hikashop');
Try like this instead:
define('JPATH_COMPONENT','hikashop');
Please Log in or Create an account to join the conversation.
Time to create page: 0.218 seconds