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.

Archive /

Our old forums are still available as a read-only archive.

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

Save hangs on DataObject

Go to End

3 Posts   1388 Views


Community Member, 66 Posts

23 April 2008 at 9:44am

And another thing which is confusing me.

In my from DataObject derived Class which is edited via PopUp,
a getCMSFields_forPopup
is opened.

if i click the save Button the Save Button gets' 'a busy state, but things never end.
i've tryed a lot of things to find out what's going on
DeveloperMode, Debug on, Debug_controller on, etc. which helped me in many other cases to find solutions. but here i'm totally 'out of control'.
there's nothing special within this class, no user function...

things get complicated becouse i dont see debug messages within this popup...
would be happy for any hint, how to deal this...



Community Member, 66 Posts

25 April 2008 at 7:07am

Edited: 25/04/2008 8:42am

i did a try with this thing in 2.2rc3.
but the problem still remains.

Doing a lot of code-searching and hacking i found that the save-button
call's admin/?executeForm=EditForm.ReferencedField.DetailForm&fieldName=MyListName
It was difficult for me, as a rookie, to find the corresponding 'function' part in Silverstripe.
turned out that soemhow there the follwong function is called:

function saveComplexTableField() {

if i do a die at the start of this function the save-button
end's his 'active state', but of course nothing is saved.
problem is doing Debug::message
doesn't show me anything (becouse here we are in a popup window, i think)
this makes things hared to find out.
maybe there's some possibility to do a trace (log) within silverstripe?

and maybe this can help someone else who has the same problem ;-)
i'll keep you informed...

Found the documentation for having logging / tracing in files: COOL :-)
i added
ini_set("log_errors", "On");
ini_set("error_log", "php_error.html");
to my _config.php
and used fe..
error_log('BEFORE childObject-write');
within code
but there's no file php_error.html in the saphire directory (neither in cms..)
would be cool to get any hint...

makes the troubles,
a die before the command, and buttons stops working
only a die after, and the button hangs...


Community Member, 66 Posts

25 April 2008 at 9:11am

Edited: 25/04/2008 9:21am

using FireFox Plugin 'FireDebug' enabled me to show
ss Debug-Messages in the console.
<b>Fatal error</b>: Class 'VarChar' not found in <b>/www/xxxx/sapphire/core/Object
.php</b> on line <b>92</b><br />

one Minute Later, changing my VarChar to Varchar within DataObject
solved a lot of troubles for me...

so, now i'll take a COLD BOTTLE OF BEER