Search

first off, not enough can be said about brendo's detailed look at symphony events. not only did it help me overcome an obstacle with a project, but after doing it just one time, the mechanics of an event's input and output are completely unlocked and i feel like the potential is unlimited with a minor amount of knowledge and code.

anyone newer to symphony, this is an absolute must read.

i presented one hurdle on twitter that seemed to have fizzled off in the time zone differences regarding POSTed input type="file" fields. i discovered that the relevant properties of this field aren't handled by $_POST, but rather by $_FILES. fair enough, i figured that in my event's load() i can simply copy the tactic used to preserve the $_POST array:

$this->post = $_POST;
$this->files = $_FILES;

then, per brendo's directions, in __trigger():

unset($_POST['fields']);
unset($_FILES['fields']);
$_POST['fields'] = $this->post['my-event-name']['fields']
$_FILES['fields'] = $this->files['my-event-name']['fields']

now a print_r($_FILES) shows that the assignment was completed correctly. my theory is that somewhere along the lines, symphony is taking that data into its own hands and by the time __trigger() is called, $_FILES is irrelevant.

i appreciate any direction, even if it's as modest as "check out this core class."

Keep in mind that the $_FILES array is a completely different beast to the usual $_POST array, have a read of the PHP manual about that array.

Symphony does manipulate the $_FILES array and attempts to merge it into the $_POST array using the General::getPostData function, but this only happens once the event.section.php file is included, so anything prior to that line in the trigger function should be ok.

I really need to finish/update/tidy up that tutorial, there's been a couple of additional requests around the same subject. It's definitely on the list so to speak :)

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