Looking for documentation? Take a look on our wiki

Main Menu

Potential Safe Path BUG ?

Started by WebStuff, February 15, 2024, 18:37:33 PM

Previous topic - Next topic


Joomla! 3.10.12
VirtueMart 4.2.6
PHP 8.1.9

My invoice/delivery_note pdfs are not being saved, they are being generated when the button is clicked for display in the browser but not written to the Safe Path location.
Just noticed that my Safe Path is showing as set to an odd address with the error message that comes up in Tools & Migration.
But is set to the correct path in Configuration->Templates but this is not the path that is being reported as in error.

The Error listed is:
vmError: Path wrong to store invoices, folder invoices does not exist /var/vmfiles/invoices/
vmError: Path wrong to store invoices, folder invoices does not exist /var/www/SUBFOLDER/administrator/components/com_virtuemart/[RANDOM_NUMBER]/invoices/

These are the correct settings as shown in the Safe Path Active Section of Tools->Safe Path Tools that are still showing as correct and used to work.:
/home/public_html/vmfiles/SUBFOLDER/ exists Writeable 700
/home/public_html/vmfiles/SUBFOLDER/invoices/ exists Writeable 700
/home/public_html/vmfiles/SUBFOLDER//keys exists Writeable 700

All the references to getting the Safe Path I can find in the code are getting the forSale_path for some reason. ????
And I can't find where the Safe Path is stored as it's not in my #__virtuemart_configs table in database.

This all used to work fine up until the 4.2.6 update.

Any help greatly appreciated.

This may not be the issue with my delivery notes I suppose.
This could just be a badly worded message or it should actually be a Notification/Information message rather than an Error if it is just informing me that those paths don't exist however the phrase "vmError: Path wrong to store invoices" would in that case be ill-judged as this implies that something is set wrong and therefore something won't work correctly.
Paths not existing is already displayed in a less alarming way in the main part of the tab.
I'm going to see if I can debug the failure to save the pdfs assuming that it's something else.

Okay after some debugging I've discovered that the files are saving but they are saving using the wrong prefix, they are using the invoice prefix instead of the delivery prefix. So this is unrelated to Safe Path error which is still in effect.