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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

onBeforeWrite in Page problems

Go to End

4 Posts   2040 Views


Community Member, 2 Posts

27 January 2010 at 12:37pm

hey.guys..i met a problem with the function onBeforeWrite () on Page type.
i want to execute a function once click the [SAVE]or[SAVE and Publish] Function..
but when i put the onBeforeWrite() into Page Type. In the backend, when i click the save button, it shows [Javascript Parse Error],
Where do you think the problem will be?!


Forum Moderator, 5523 Posts

27 January 2010 at 1:04pm

It could be your Debug::show() causing the issue. If you have Firebug enabled you can see what the error returned is by looking at the console panel -> response tab.


Community Member, 2 Posts

27 January 2010 at 1:24pm

Thanks, willr, the problem is i didnt click the Php extension [clurt]. but i am using the method in my code area...
The firebug do helps a lot.. thanks for your suggestion.


Community Member, 3 Posts

29 January 2010 at 6:07am

Hi I am trying to use the same onBeforeWrite for Keywords/Description as you are using, is this working for you?
I am finding it is not adding any keywords or description