Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Releases and Announcements
SilverStripe Forums » Releases and Announcements » 2.3RC4 -> Undocumented backwards incompatiblity with Image->URL
Latest news about the SilverStripe software.
|
Page:
1
|
Go to End | |
| Author | Topic: 2.3RC4 -> Undocumented backwards incompatiblity with Image->URL | 1133 Views |
-
2.3RC4 -> Undocumented backwards incompatiblity with Image->URL

22 February 2009 at 5:56am
For http://www.fahrenheitstore.nl I use GD quite a lot to re-size images and add watermarks to them.
After upgrading the site to 2.3rc4 , the watermarks stopped working ..
It seems the value of the URL property of the Image class has changed.. From 2.3 on , it returns a relative path instead of a full absolute address. This breaks backwards compatibility.
I can't find anything about it in the docs (maybe I'm not look in the right places), but before I post a ticket, can anyone confirm this behaviour for me ?
Testcase :
2.2.3
class Bla extends Image {
..
return $this->URL;
..
}returns : http://www.blabla.com/assets/bladiebla/bla.jpg or something like that..
Where in 2.3 it returns just
/assets/bladiebla/bla.jpg
Thanks !
-
Re: 2.3RC4 -> Undocumented backwards incompatiblity with Image->URL

24 February 2009 at 8:34pm
There was indeed some tricky deprecation for Image->URL. Relevant changesets from 11 months ago:
http://open.silverstripe.com/changeset/51251
http://open.silverstripe.com/changeset/51471/$image->URL should call $image->getURL(), which gives you a relative link in 2.3 - so not sure why this fails...
Did you subclass image, and perhaps added a $db property called URL?
I've also found out that File->getURL() actually returns the absolute URL - this inconsistency needs to be fixed, I've opened a ticket: http://open.silverstripe.com/ticket/3600
-
Re: 2.3RC4 -> Undocumented backwards incompatiblity with Image->URL

24 February 2009 at 9:04pm
>$image->URL should call $image->getURL(), which gives you a relative link in 2.3 - so not sure why this fails...
Well yeah, that is indeed what it does.. ;-) But in 2.2.3 , it returned an absolute link .. I think it should be noted in the upgrade-documentation that this is going to happen , because it took me quite some time to figure out why my site got killed.. That is all.. ;-)
-
Re: 2.3RC4 -> Undocumented backwards incompatiblity with Image->URL

24 February 2009 at 9:57pm
Lol, yeah got myself confused there ;) Added a note to http://doc.silverstripe.com/doku.php?id=upgrading:2.3.0
I should've marked the original commit as "API CHANGE", in which case it wouldn't have gone unnoticed in compiling the upgrade warnings.
-
Re: 2.3RC4 -> Undocumented backwards incompatiblity with Image->URL

24 February 2009 at 10:02pm
Cool...
thanks !
| 1133 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: SSadmin, Carolg, CodeGuerrilla , Euphemismus, pitsnipe, rgo, Sean, freenet, Willr
Welcome to our latest member: pitsnipe


