Hi,
I execute a function from the controller and want to update a variable stored at $db = array(), but I don't get it...
Here is a pastie with my code: http://pastie.org/8376525
Thanks.
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
Hi,
I execute a function from the controller and want to update a variable stored at $db = array(), but I don't get it...
Here is a pastie with my code: http://pastie.org/8376525
Thanks.
Looks like you're there. You should be able to call the URL of your page such as mysite.com/mypage/makeUpdate and it should run. Do you get an error? That makeUpdate function should probably return something, either redirect the user to another page or show them some sort of error message.
This is so wired.
When I access the variable in the controller, it contains the correct values, but it seems, that they are not written to the database.
Means, when I try to read em back in - either via the controller or the CMS backend - they don't contain the changes.
Sorry, no error message, even nothing inside the Apache logs.