Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Page Not Found in ImageField iframe


Go to End


1343 Views

Avatar
opex

Community Member, 7 Posts

2 May 2012 at 7:45pm

Edited: 02/05/2012 9:25pm

Hi,

I have a problem with the ImageField that I can't seem to solve.

I've made a SiteConfig-decorator to add an ImageField where the site admin can upload a banner to use on their site. This works great in the test environment but fails on the live server. What I get in the iframe is a Page Not Found instead if the image upload form.

The url loaded in the iframe looks like this; http://example.com/admin/RootForm/field/SiteLogo/iframe and if I load it in the browser I get the Page Not Found error. But if I append a ? to the url the form loads perfectly fine. So I've hit a dead end.

I've searched for solutions and tried the one posted here, but it didn't help.

I'm not sure if it's of any help, but the live server configuration is
Apache: 2.2.22
PHP: 5.2.17
SilverStripe: 2.4.5 but I've tested the latest from silverstripe.org (2.4.7 i believe) with the same result

UPDATE
I've found something out that makes me believe that this is not a SS issue but rather some kind of server configuration that plays hide and seek with me.

By dumping the $url passed to Director at the end of main.php I've found out that if I visit
http://example.com/admin/RootForm/field/SiteLogo/iframe
the url is 406.shtml
but if I append anything whether it be / or ? the url passed is admin/RootForm/field/SiteLogo/iframe/ the field is rendered as it should be.

The quick solution in my case is to append a / to the iframe url in FileIframeField but if anyone has a clue where I can start to hunt this error down I'm all ears.