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.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Popup shows homepage after save - example code

Go to End

9 Posts   2157 Views


2 October 2009 at 12:53am Community Member, 40 Posts


I apologise if this has been beaten to death already before - however - I could not find this issue in the forum.

I'm quite a newbie with SS and after finishing the 2 first tuts - I thought I had a go at DOM as this is exactly the module I need for an upcoming project.

I'm using DOM r292..

Going through the examples on - I run into a small but annoying issue:

I have been implementing the 'Testimonial' example and everything works beautifully, except that when I hit 'Save' in the pop-up window, the content of the popup window is being redirected to the homepage of the site (so basically 'localhost' on my test machine) instead of simply showing the expected 'Added new Testimonial successfully' (which I see when I subsequently add a new testimonial strangly enough..).

I'm probably missing something very obvious but I can seem to find out what? Can someone point me in the right direction please?

Many thanks,


2 October 2009 at 1:26am 4085 Posts

Check for javascript errors.


2 October 2009 at 2:12am (Last edited: 2 October 2009 2:13am), Community Member, 40 Posts

Ok, that was a bit tricky as this is in a popup. So what I did -> rightclick in the popup-up -> open this frame in new Tab (Firefox). So the form is then in a new tab with firebug available (;-)) -> filled out the form, hit Save - and no javascript errors to be seen... it simply redirects to locahost..

I'm lost..

EDIT: PS - just to be clear - the record is correctly added so functionally it works fine..


2 October 2009 at 3:15am Community Member, 40 Posts

Ok, found out some more and now I'm not sure if this is a DOM specific issue I'm seeing.

I checked out the NET console in Firebug so see what was happening on the 'Save' submit of the form..

Failed to load source for: http://localhost/admin/EditForm/field/Testimonials/AddForm?ctf[Testimonials][start]=0&ctf[Testimonials][per_page]=10&ctf[Testimonials][showall]=0&ctf[Testimonials][sort]=SortOrder&ctf[Testimonials][sort_dir]=DESC&ctf[Testimonials][search]=&ctf[Testimonials][filter]=

And then it redirects to localhost.. So something seems wrong with my Silverstripe install maybe? Is the path where the form tries to submit to correct in the first place?

Please assist? I'm quite lost..


2 October 2009 at 3:20am 4085 Posts

You got a link I can test?


2 October 2009 at 3:31am Community Member, 40 Posts

I'm afraid not - I've only got it running locally :-(

I think I can rule out DOM though - I just finished the Staff section in Tutorial 2 where you add an image..
In that (normal) image upload thingie, I get exactly the same behaviour when I submit the image.. it also load the homepage in the little Iframe there with the following error in the NET console:

Failed to load source for: http://localhost/images/index/StaffPage/22/Photo/EditImageForm

Any ideas?


2 October 2009 at 4:29am 4085 Posts

Usually means you haven't checked off a radio button for from pc or upload.


2 October 2009 at 5:26am Community Member, 40 Posts

Not in this case I believe. I choose the upload from PC option, selected an image - and the actual upload worked fine - it just doesn't show me the confirmation message - it simply redirects the iFrame to the 'homepage'...

Not sure what's wrong here but I'm now doing a fresh install on my VDS which is also available under a domain name so if I run into the same issue again - I can provide you with a URL.

I'm starting to believe however that this might be an environment thing i.e. the PHP version on my specific (Mac OSX) OS that might be causing this strange behaviour. So running it of my VDS will proof if that's the case I guess (in that case the conclusion might be... do not try to run this of a Mac ;-)).

Thanks for your help so far - I might get back to this issue if I run into it again on my server.

Go to Top