Author Topic: VM path handling issues and inconsistencies  (Read 337 times)

TechnoMage

  • Beginner
  • *
  • Posts: 31
VM path handling issues and inconsistencies
« on: July 24, 2017, 13:20:38 pm »
Hi,

I am having some issues with my VM path handling (VM 3.2.2 and Joomla 3.6.5) and want to understand how does that work exactly.

My absolute path for the Joomla setup  is

/var/www/yvonne/data/www/harisnyacenter.sytes.net/.

Consequently I have setup both the tmp and logs paths as

/var/www/yvonne/data/www/harisnyacenter.sytes.net/logs/
/var/www/yvonne/data/www/harisnyacenter.sytes.net/tmp/

  • I have the following path setup for VM under settings templates:

        safepath=SafePathXYZ/
        assets_general_path=components/com_virtuemart/assets/
        media_category_path=images/stories/virtuemart/category/
        media_product_path=images/stories/virtuemart/product/
        media_manufacturer_path=images/stories/virtuemart/manufacturer/
        media_vendor_path=images/stories/virtuemart/vendor/
        forSale_path_thumb=images/stories/virtuemart/forSale/resized/

    Once I save the settings the folders are being created under

    /var/www/yvonne/data/www/harisnyacenter.sytes.net/administration/

    e.g. for safepath

    /var/www/yvonne/data/www/harisnyacenter.sytes.net/administration/SafePathXYZ/invoices.

    If I provide my absolute paths the entire folder structure is still being created under

    /var/www/yvonne/data/www/harisnyacenter.sytes.net/administration/

    as

    /var/www/yvonne/data/www/harisnyacenter.sytes.net/administration/var/www/yvonne/data/www/harisnyacenter.sytes.net/administration/SafePathXYZ/invoices.

    This would be fine however VM creates the keys file under

    /var/www/yvonne/data/www/harisnyacenter.sytes.net/SafePathXYZ/keys

    which is inconsistent with the earlier folder creation. To be fair this whole functionality does not make too much sense for me.
  • In addition to this as you can see I have all my vm images under

    /var/www/yvonne/data/www/harisnyacenter.sytes.net/images/stories/virtuemart/

    including the payment and shipment folders

    /var/www/yvonne/data/www/harisnyacenter.sytes.net/images/stories/virtuemart/payment/
    /var/www/yvonne/data/www/harisnyacenter.sytes.net/images/stories/virtuemart/shipment/

    and all my media files are set accordingly under the settings templates (as could have seen under point 1). In spite of this I am getting errors from Joomla because for shipment and payment media files VM and Joomla looks for the images under

    /var/www/yvonne/data/www/harisnyacenter.sytes.net/images/virtuemart/payment/
    /var/www/yvonne/data/www/harisnyacenter.sytes.net/images/virtuemart/shipment/

    This again does not make too much sense for me. Why cannot one specify the path for these folders why are those hard coded if the rest can be customized.

Can someone please explain to me if I am doing something wrong or if these are just shortcomings in the current VM version?

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26428
  • Always on vacation
    • Jenkin Hill Internet
Re: VM path handling issues and inconsistencies
« Reply #1 on: July 24, 2017, 15:08:01 pm »
You should have updated Joomla to 3.7.3 by now, as that was a security release.  https://www.joomla.org/announcements/release-news/5709-joomla-3-7-3-release.html

J3.7 does no longer use images/stories/ by default, so VM3.2.2 is set to work with that. Instead of  images/stories/virtuemart/ it now uses  images/virtuemart/
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.10 on Joomla 3.8.3 PHP 7.0.25

Testing VM3.2.10.9700 on J3.8.3

TechnoMage

  • Beginner
  • *
  • Posts: 31
Re: VM path handling issues and inconsistencies
« Reply #2 on: July 24, 2017, 17:40:45 pm »
Thanks jenkinhill.

I had some issues with the core update that is why I have not done it in the past.

Is there an easy way to update all media paths in VM using the new standards?

Also it must be just me being stupid but if there is such a significant change it would be good to have some safeguard in the as part of the update to check first the Joomla version and don't even start the update if it is incompatible with the current core version.

I will check point 1 again using this new core later on.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26428
  • Always on vacation
    • Jenkin Hill Internet
Re: VM path handling issues and inconsistencies
« Reply #3 on: July 24, 2017, 19:13:10 pm »
VM3.2.3.9579 does work with older versions.  When Joomla 3.7.x is installed on most sites the image files in the stories directory and its subdirectories are automatically moved into the images root. Image paths are automatically updated at that time.

As for safepath & keys I don't have a problem with those as the vmfiles directory is  below server root, invoices and keys are written there.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.10 on Joomla 3.8.3 PHP 7.0.25

Testing VM3.2.10.9700 on J3.8.3

TechnoMage

  • Beginner
  • *
  • Posts: 31
Re: VM path handling issues and inconsistencies
« Reply #4 on: July 26, 2017, 09:49:01 am »
Thanks.

All the errors were there due to Joomla 3.6.5.

Anyway it would be great to do some Joomla core version check before the update to avoid such problems.