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 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.

Form Questions /

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

[SOLVED] ItemEditForm returns "empty tab space" after creating new item

Go to End



Community Member, 16 Posts

24 February 2017 at 2:22am

Edited: 27/02/2017 8:11am

my version is 3.5.1,

I have this problem, after I create a new item in model admin, ItemEditForm will return "empty tab space" after ajax call and therefore it is handled as "not empty" and it is handled in wrong way what ends in blank page scenario.

What I have found out yet:
1. I submit create new item button
2. ajax request is fired:
LeftAndMain.js #498
3. on success it gets "nothing" like it should get
LeftAndMain.php #514 - return ''; // Actual response will be re-requested by client
However somehow there is "empty tab space" before this (in front of it) in returning data and I do not know why yet
LeftAndMain.js #506 - success(data, ..) -> data looks like '{empty tab}'.'' and not just like ''
So at this point it will "fail" here:
LeftAndMain.js #744 - if(!data) return; -> "empty tab space" is not considered as empty so it will continue
And finaly it will change content to update to "Content" from "CurrentForm,Breadcrumbs" at
LeftAndMain.js #602
Blank page is here :-)

Is this issue fixed in newer releases or? Could you give me a hand where can I trace this "tab"?


P.S. It will disappear when I use silverstripe-debugbar module.

Edit: To clarify, when I move MyItem into another admin it works normally

FinalEdit: Problem was with tab space before opening php tag in another DataObject file from the ModelAdmin. You can google some details about ajax response data whitespace or take a quick look here.