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

Customising the CMS /

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

onBeforeWrite in Page problems


Go to End


4 Posts   2373 Views

Avatar
ss_sneak

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?!

Avatar
Willr

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.

Avatar
ss_sneak

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.

Avatar
rs82uk

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

Cheers