Preventing relative upload paths in V2.09

12 posts by 3 authors in: Forums > CMS Builder
Last Post: June 14, 2011   (RSS)

Re: [Pixels & Beats] Preventing relative upload paths in V2.09

By Jason - June 8, 2011

Hi Paul,

If you could fill out a [url http://www.interactivetools.com/support]2nd Level Support Request[/url] and we can take a look.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Preventing relative upload paths in V2.09

Done. Sorry for the delay but it's the workload here is stupid. Thanks Jason :)

Re: [Pixels & Beats] Preventing relative upload paths in V2.09

By Dave - June 10, 2011

Paul,

Could you post your ticket ID or email it to me at dave@interactivetools.com? I'm working on 2.10 and want to take a look at this.

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Preventing relative upload paths in V2.09

Hi Dave,

I seem to have no record of the ticket number. They normally get emailed after filling out the form don't they? Just checked all email folders and got nothing atm.

I am happy to fill out another one if required. Our net connection has been a bit iffy today....

Re: [Pixels & Beats] Preventing relative upload paths in V2.09

By Jason - June 10, 2011

Hi,

I found your request in our support queue and have forwarded the information all to Dave.

We'll be looking into this issue and should have an update for you soon.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Preventing relative upload paths in V2.09

Thanks Jason!

Re: [Pixels & Beats] Preventing relative upload paths in V2.09

By Dave - June 10, 2011

Hi Paul,

Ok, I think I've identified the issue. When you have a custom upload path/url set for a field it adds the hostname to the thumbUrlPath, etc fields.

Can you try this custom change?

- Open /lib/upload_functions.php
- Search for realUrl (around line 533)
- Replace this:
if (!isAbsoluteUrl($uploadUrl)) {
$uploadUrl = realUrl($uploadUrl, $SETTINGS['uploadUrl']);
}


- With this:
if (!preg_match("|^/|", $uploadUrl)) {
$uploadUrl = realUrl($uploadUrl, $SETTINGS['uploadUrl']);
$uploadUrl = preg_replace("|^\w+://[^/]+|", '', $uploadUrl); // remove scheme://hostname
}


Let me know if that works for you. If so we'll include it in 2.10.

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Preventing relative upload paths in V2.09

Hi Dave,

Sorry but I rolled back the website to version 2.08 as it is a live national site. I really need to look into setting up a live test area, but due to the pressures I am under this has not yet been possible.

Is it OK to duplicate a CMSB install /setup using the same product code for test purposes? If so I will try and do something this week as it will help us all. Especially when you have got back so quick with a potential solution!

Kind Regards

Paul

Re: [Pixels & Beats] Preventing relative upload paths in V2.09

By Dave - June 13, 2011

Hi Paul,

Yes, we'd call that a "staging" install. and staging or test installs are fine and allowed by the license agreement.

Let me know how it goes and anything else I can do to help. Thanks!
Dave Edis - Senior Developer
interactivetools.com