3430 Posts in 1057 Topics by 734 members
|Go to End|
17 February 2012 at 10:00am Last edited: 17 February 2012 4:32pm
Guys, PLEASE PLEASE HELP!! I'm old(ish), you can see that from my boater!
I am desperate to fix a jquery mobile issue.
I have posted a couple of times but with no replies. I have since found the problem but I can't find which classes I have to modify. The are very deep in the CMS.
What I want is to alter the image insert pane so it alters images to have a leading slash. I then want to alter the save parser and image resizer so that it doesn't remove a slash that is there when it creates a new filename/path.
Here goes ...I have partly found the answer to the strange rewrites of /assets/image.jpg to assets/image.jpg. In this following real world example the leading slash gets stripped by the class that creates a new image size:
I'm not asking for a fix - I can do that but I cant find where.
17 February 2012 at 1:55pm
I might add that this was posted to the net, thus showing how annoying this behaviour is. This is a classic case of shutting the door after the horse has bolted:
18 February 2012 at 1:50am
Somewhere around line 624, in the insert() function it says:
var baseURL = document.getElementsByTagName('base').href;
var relativeHref = this.href.substr(baseURL.length);
Thus subtracting the contents of the <base> tag from the href. I suppose you could experiment wth adding a '/' to the front of the relativeHref, if it doesn't start with, say, 'htt'...
Mind: experiment! I haven't the faintest idea what kind of problems shutting the door in front of this bolting horse might get you into, in this case
22 February 2012 at 12:25pm
In the end I gave up and applied the fix I mentioned since although nuts, it was simple and will survive updates! I still think there should be an option to use root relative urls though (and jquerymobile) falls to bits without them. The fix is now in use at http://boatshow.co.nz
However thanks for telling me where to look. I still need to find where the image resizer does its work in stripping the leading slash too.
|Go to Top|