Jump to:

23355 Posts in 17873 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Problems with absolute urls

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 226 Views
  • Jeremiah
    Avatar
    Community Member
    4 Posts

    Problems with absolute urls Link to this post

    Hello SS community!

    We've recently adopted SilverStripe as our hosting CMS. Currently we're running into a problem where at times image paths are being saved in the database as absolute urls. This is posing a problem because when we copy the site's database between environments it has the wrong path, and for our live environment the dev url isn't available to the rest of the world.

    Anyone have any ideas how this might be happening? I haven't been able to reproduce the problem. I'm not the one actually building the CMS sites but maintain the SilverStripe code and features. I should also note that in the WYSIWYG editor the url shows up correctly as "assets/..." but when you look at the value in the database, and what gets rendered on the site, it has the absolute url. If I go and save the page again then the correct value gets saved in the database. I just can't for the life of me figure out how it would get the absolute url in the first place, and the fact that it shows the right url in the CMS editor.

  • Bereusei
    Avatar
    Community Member
    94 Posts

    Re: Problems with absolute urls Link to this post

    Without any code, where the imageobjects are generated, it's difficult to say.
    I worked years with Silverstripe and switched project many times from testservers to real servers, but this never happend to me before.

    How do you upload the images? With uploadFields or something?

    By the way: what version of Silverstripe do you use?

  • Jeremiah
    Avatar
    Community Member
    4 Posts

    Re: Problems with absolute urls Link to this post

    SS 3.0 is the version we are using hosted on server 2008 with SQL backend.

    I was wondering if anyone had seen anything similar to this happen. I personally am not the one designing the site and am just the guy that fixes it. In an instance that happened yesterday the designer told me exactly how they added the files and referenced them in the cms. I tried replicating the problem with the same procedures and wasn't able to, so they must've left something out... They were putting the png files directly in the uploads folder and then pasting html code into the html code function of the editor. I told them to upload them through silverstripe instead of just copying them but either way I wasn't able to reproduce it, and I tried many different combinations of things.

    What doesn't make sense to me is how the value in the database was stored with the absolute url and the value that was displayed in the TinyMCE html editor was to "assets/uploads/..."

    226 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.