Jump to:

5452 Posts in 1673 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » onBeforeWrite in Page problems

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

Page: 1
Go to End
Author Topic: 1427 Views
  • ss_sneak
    Avatar
    Community Member
    2 Posts

    onBeforeWrite in Page problems Link to this post

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

    Attached Files
  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: onBeforeWrite in Page problems Link to this post

    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.

  • ss_sneak
    Avatar
    Community Member
    2 Posts

    Re: onBeforeWrite in Page problems Link to this post

    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.

  • rs82uk
    Avatar
    Community Member
    3 Posts

    Re: onBeforeWrite in Page problems Link to this post

    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

    1427 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.