Welcome, Guest
Username: Password: Remember me

TOPIC: URL Path to Preview Files

URL Path to Preview Files 9 years 6 months ago #2554

I was developing my site online, but decided to move the development to my local computer. I used Akeeba to backup the site, and then restored it locally. I'm using XAMPP locally. Everything seems to work correctly except when I attempt to PREVIEW a pdf. The PDFs are there in the folder, but the URL to it seems to have an error. When I put my cursor on the PREVIEW button, the URL looks like this:

localhost/odforms/administrator/components/com_quicksell/uploads_previews\399/handbook.pdf

When I click on PREVIEW I get a 404 error that the URL is not found.

Note the "\" before the 399. I suspect that's the problem. That seems to be coming from within the component somewhere.

Do you know how I can correct this so I can do development on my local machine, then restore it to the live site?
The administrator has disabled public write access.

URL Path to Preview Files 9 years 6 months ago #2555

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 900
  • Thank you received: 64
  • Karma: 7
Hi Craig,

Try to clear the upload folder path and re-save the configuration.

It will automatically detect/fill in the proper one.

Thanks
Plugin Developer
e-mail This email address is being protected from spambots. You need JavaScript enabled to view it.
Need fast web hosting service? Use our SSDShared.com
Get 1 month free cPanel MOCHA LATTE package with coupon: SHOPFILES1MONTH
It works great with both Joomla and WordPress.
How fast? demo.ssdshared.com
The administrator has disabled public write access.

URL Path to Preview Files 9 years 6 months ago #2563

Do you mean the Storage Directory in the Configuration screen?

I changed that to c:/xampp/htdocs/odforms/Files and now the files show up. I re-uploaded the preview PDF. But I still get the error. I definitely seems to be related to a forward slash ("\") instead of a back slash ("/") being inserted in the path to the preview PDF files. Working fine on my live site. Just not on the localhost copy.

On the live site, when I look at the URL that's being pointed to when I put the mouse on the Preview button, it's correct. When I do the same thing on the local version, the slash's are reversed between ...uploads_previews and the number. It reads ...uploads_previews\392\filename.pdf instead of ...uploads_previews/392/filename.pdf as it does on the live site.
The administrator has disabled public write access.

URL Path to Preview Files 9 years 6 months ago #2566

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 900
  • Thank you received: 64
  • Karma: 7
Hi,

Can you just replace by hand the slashes from \ to / and check if the url will work?

Thanks
Plugin Developer
e-mail This email address is being protected from spambots. You need JavaScript enabled to view it.
Need fast web hosting service? Use our SSDShared.com
Get 1 month free cPanel MOCHA LATTE package with coupon: SHOPFILES1MONTH
It works great with both Joomla and WordPress.
How fast? demo.ssdshared.com
The administrator has disabled public write access.

URL Path to Preview Files 9 years 6 months ago #2567

Actually, I tried that and yes, it worked.

It appears that the path to the files is being created somewhere in the code, and it is drawing that information from a location that's giving it bad data. I don't know where it is getting the path to the files. Seems to me it may have something to do with data in the .htaccess or in configuration.php files, as those are the main ones that differ in the local version from the server.

Maybe this will help. On the UPLOAD page, where it asks Do You Want to Upload via FTP, it says this:

You can use FTP to upload to the following directory: C:\xampp\htdocs\odforms\administrator/components/com_quicksell\uploads

Note again the reversal of the slash to a forward slash in two places? Those should not be there. There should only be back slashes. When I look at that exact same line in the online version on my server it says:

You can use FTP to upload to the following directory: /home/odforms/public_html/administrator/components/com_quicksell/uploads

Note there all forward slashes.

So, somewhere in constructing those paths the wrong slash is being inserted or read.

Craig
The administrator has disabled public write access.

URL Path to Preview Files 9 years 6 months ago #2568

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 900
  • Thank you received: 64
  • Karma: 7
Hi Craig,

I think I know what it is, it uses the DS (DIRECTORY_SEPARATOR) constant somewhere there and it's \ on windows.

I'll look into it within the next 24 hours.

Thanks
Plugin Developer
e-mail This email address is being protected from spambots. You need JavaScript enabled to view it.
Need fast web hosting service? Use our SSDShared.com
Get 1 month free cPanel MOCHA LATTE package with coupon: SHOPFILES1MONTH
It works great with both Joomla and WordPress.
How fast? demo.ssdshared.com
The administrator has disabled public write access.
Time to create page: 0.049 seconds