Search

I have added an event to my site that allows me to post comments to articles but I am unable to access the XML that the event returns, e.g. for a failed comment submission:

<post-comment result="error">
  <message>Entry encountered errors when saving.</message>
  <field-name type="invalid | missing" />
  ...
</post-comment>

The event XML appears commented out at the bottom of my page source and it is also present in the page XML if I set my form action to “?debug”. But how do I access it without the debug setting?

Problem solved. I think I was getting confused here - viewing the page in Debug reloads the page which is why I wasn’t seeing the event XML. Stupid of me.

Another Events question. Is the parameter pool accessible from the __trigger function in the events PHP code?

Another Events question. Is the parameter pool accessible from the __trigger function in the events PHP code?

Yes, I think it is somewhere in $this->_env

If it’s not, you can try to var_dump($this); and see if you can find it. :-)

Sounds good. I’ll take a look.

Hmmm. My Data Source’s Output Parameter doesn’t seem to be in $this->_env (or anywhere in $this). Is there a way to access output parameters from an event’s __trigger() function?

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details