News:

Looking for documentation? Take a look on our wiki

Main Menu

error after upgrade 2.0.2 to 2.0.4

Started by multiaction, April 11, 2012, 20:04:43 PM

Previous topic - Next topic

multiaction

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

ZX81

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

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

multiaction

Hi Milbo,

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

Regards

Alex

Milbo

We are just on writing a workaround for php5.2
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

mosa

I have exactly same problem. Hope a new upgrade or solution come soon..

multiaction

Hi Milbo,

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

Regards

Alex

alatak

#7
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

multiaction

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

John2400

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?

John2400

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 -

jenkinhill

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....
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

alatak

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.

alatak

Hi

An echo was missing.
The correct fix is this one:
$oldlayout=$this->getLayout();
$this->setLayout('invoice');
echo $this->loadTemplate('items');
$this->setLayout($oldlayout);

John2400

Perfect -

The invoices in the eamils came perfectly

thank  you

I will still update to 5.3 plus asap