VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: multiaction on April 11, 2012, 20:04:43 PM

Title: error after upgrade 2.0.2 to 2.0.4
Post by: multiaction on April 11, 2012, 20:04:43 PM
After i upgraded, and i test by making an order i get this error after te order-confirmation: I have a screen with a few that looks like the order-mail he has to send and beneath that:

Warning: require(__DIR__/invoice_items.php) [function.require]: failed to open stream: No such file or directory in /home/XXXXXX/domains/XXXXXX/public_html/components/com_virtuemart/views/invoice/tmpl/mail_html_pricelist.php on line 22

Warning: require(__DIR__/invoice_items.php) [function.require]: failed to open stream: No such file or directory in /home/XXXXXX/domains/XXXXXX/public_html/components/com_virtuemart/views/invoice/tmpl/mail_html_pricelist.php on line 22

Fatal error: require() [function.require]: Failed opening required '__DIR__/invoice_items.php' (include_path='.:/usr/local/lib/php') in /home/XXXXXX/domains/XXXXXX/public_html/components/com_virtuemart/views/invoice/tmpl/mail_html_pricelist.php on line 22

Has someone any idea why i get that?
When i reïnstall my 2.0.2 backup i dont have any problems.
The invoice_items.php seems to exist.

Regards

Alex
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: ZX81 on April 11, 2012, 21:49:06 PM
Joomla! 2.5.4/VM 2.0.4
Hi

Yes, I have the same problem. The only difference is the include path on my error message is pointing somewhere else, see below

Fatal error: require() [function.require]: Failed opening required '__DIR__/invoice_items.php' (include_path='.;C:\xampp\php\pear\')

None of the email notifications are working after upgrade. Is this a problem with working on localhost? Everthing else appears to be fine but I'm a bit nervous about upgrading my live site without email notifications working. Any ideas?

ZX
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: Milbo on April 12, 2012, 10:09:26 AM
Hi, maybe it is your php version. When it is php 5.2.x then the error is know. thx. I will add a check if __DIR__ is known. In fact we just reuse the price_list of the invoice also for the mail.
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: multiaction on April 12, 2012, 10:34:37 AM
Hi Milbo,

Yes its php 5.2.x...
What do i have to do then?

Regards

Alex
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: Milbo on April 12, 2012, 12:10:01 PM
We are just on writing a workaround for php5.2
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: mosa on April 12, 2012, 12:38:47 PM
I have exactly same problem. Hope a new upgrade or solution come soon..
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: multiaction on April 12, 2012, 12:49:16 PM
Hi Milbo,

But what should i do in the meantime?
Go back to 2.0.2 ?
How long will the workaround take?

Regards

Alex
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: alatak on April 12, 2012, 13:01:15 PM
Hi,

Fixed for the next version.


Meanwhile you can fix it that way:
In file components/com_virtuemart/views/invoice/tmpl/mail_html_pricelist.php

replace

require(__DIR__.'/invoice_items.php');



with

$oldlayout=$this->getLayout();
$this->setLayout('invoice');
echo $this->loadTemplate('items');
$this->setLayout($oldlayout);

edit by Milbo, just directly added the fix
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: multiaction on April 12, 2012, 13:34:11 PM
Thanks,

This solves it. I can order now.. I see that only my subject in the confirmation email is changed. But thats less important for now.

Regards

Alex
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: John2400 on April 12, 2012, 13:59:42 PM
Almost ,

My order shows it has gone - and two emails arrive - but there is no

content of product - ie

No product name - no shipping , or payment , tax etc

the bottom half of the invoice ?

on both buyer and vendors?
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: John2400 on April 12, 2012, 14:19:13 PM
I have just written to my domain provider to update my PHP.

I have several sites and some work perfectly - they have php 5.3.2 and the poor VM sites have 5.2.9 (all from the same provider) ??

Hopfully soon - some issues will be gone -
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: jenkinhill on April 12, 2012, 15:07:29 PM
There do seem to be various problems related to using PHP5.2 which are fixed with a version upgrade. Some hosts are slow to update versions,  5.3 was released 4 years ago....
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: alatak on April 12, 2012, 15:25:08 PM
Hi
QuoteMy order shows it has gone - and two emails arrive - but there is no

content of product - ie

No product name - no shipping , or payment , tax etc

the bottom half of the invoice ?

on both buyer and vendors?
Yes u are rigth... it works in the front end, but not in the back end.
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: alatak on April 12, 2012, 15:53:31 PM
Hi

An echo was missing.
The correct fix is this one:
$oldlayout=$this->getLayout();
$this->setLayout('invoice');
echo $this->loadTemplate('items');
$this->setLayout($oldlayout);
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: John2400 on April 13, 2012, 00:07:04 AM
Perfect -

The invoices in the eamils came perfectly

thank  you

I will still update to 5.3 plus asap
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: smpconseil on April 13, 2012, 01:28:40 AM
Hello I'm replace code.
my error messages have disappeared
But still not sending mail to the customer and the administrator
yet it is noted
info: Message sent to the correct address with mail client
I'm php 5.2.13
Thank you for your help
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: smpconseil on April 13, 2012, 09:32:11 AM
Thank you for your help
In fact the change of code works perfectly and work emails.
Just on the server of my client function was not enabled ... basic error on my part.
Thanks
Thank you to Alatak his help to the bug fix
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: yosimad on October 04, 2013, 15:26:03 PM
My code was already corrected, but the system do not send the email
Title: Re: error after upgrade 2.0.2 to 2.0.4
Post by: Maxim Pishnyak on October 06, 2013, 12:15:17 PM
System? http://forum.virtuemart.net/index.php?topic=79799