Search

Guys, I’m certainly not the best developer on the planet and I’ m not so experienced to assure that my code would work as expected.

I started grasping with git a week ago and have been studying symphony internals for a while now. I thought it was time to contribute to this wonderful project, somehow. If I’m doing it wrong, plase point me to the right direction.

I love symphony, especially its wonderful community. Please be patient with me and forgive my sins :)

alpacaaa, thanks for your efforts. They are much appreciated. My knowledge of PHP is quite rudimentary, so I’d be interested to find out what you have learned so far about the internal workings of Symphony. You know more than me.

Regarding modifications to the EventEx extension, I was just concerned about pulling code into an ensemble project that will be shared publicly. For this, the code needs to be right, but I myself wouldn’t know the difference.

Hey Guys Im having a fatal error and Im not sure why.

    Invalid argument supplied for foreach()
/home/kharandi/public_html/palsintouch/extensions/eventex/lib/class.eventex.php line 231

226         ** Run the update and return the Symphony XML
227         */
228         
229         $section_arrays = $oSectionUpdater->updateSections($sm->fetchIDFromHandle($entry), $entry, $field_array);
230         
231         foreach($section_arrays as $section)
232         {               
233             $compiled_result->appendChild($section);
234             
235             if ($section->getAttribute("result") == "error")

* 226:             ** Run the update and return the Symphony XML
* 227:             */
* 228:             
* 229:             $section_arrays = $oSectionUpdater->updateSections($sm->fetchIDFromHandle($entry), $entry, $field_array);
* 230:             
* 231:             foreach($section_arrays as $section)
* 232:             {                
* 233:                 $compiled_result->appendChild($section);
* 234:                 
* 235:                 if ($section->getAttribute("result") == "error") 

Backtrace:

* [/home/kharandi/public_html/palsintouch/extensions/eventex/lib/class.eventex.php:231] GenericErrorHandler::handler();
* [/home/kharandi/public_html/palsintouch/extensions/eventex/lib/class.eventex.php:108] GenericSectionUpdater::updateNamedSections();
* [/home/kharandi/public_html/palsintouch/workspace/events/event.save_comment.php:27] EventEx->updateNamedSections();
* [/home/kharandi/public_html/palsintouch/extensions/eventex/lib/class.eventex.php:101] eventsave_comment->__trigger();
* [/home/kharandi/public_html/palsintouch/symphony/lib/toolkit/class.frontendpage.php:549] EventEx->load();
* [/home/kharandi/public_html/palsintouch/symphony/lib/toolkit/class.frontendpage.php:233] FrontendPage->processEvents();
* [/home/kharandi/public_html/palsintouch/symphony/lib/toolkit/class.frontendpage.php:63] FrontendPage->__buildPage();
* [/home/kharandi/public_html/palsintouch/symphony/lib/core/class.frontend.php:50] FrontendPage->generate();
* [/home/kharandi/public_html/palsintouch/index.php:20] Frontend->display();

Database Query Log:

* SET NAMES 'utf8'; [0.0001]
* SET CHARACTER SET 'utf8'; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'asdc' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'asdc' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'bilinkfield' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'bilinkfield' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'databasemanipulator' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'databasemanipulator' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'debugdevkit' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'debugdevkit' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'emailtemplatefilter' LIMIT 1; [0.0002]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'emailtemplatefilter' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'eventex' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'eventex' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'export_ensemble' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'export_ensemble' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'jit_image_manipulation' LIMIT 1; [0.0002]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'jit_image_manipulation' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'maintenance_mode' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'maintenance_mode' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'markdown' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'markdown' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'mediathek' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'mediathek' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'members' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'members' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'profiledevkit' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'profiledevkit' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'publishfiltering' LIMIT 1; [0.0001]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'publishfiltering' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'selectbox_link_field' LIMIT 1; [0.0002]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'selectbox_link_field' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'smtp_email_library' LIMIT 1; [0.0002]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'smtp_email_library' LIMIT 1; [0.0002]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'systemidfield' LIMIT 1; [0.0002]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'systemidfield' LIMIT 1; [0.0001]
* SELECT `status` FROM `sym_extensions` WHERE `name` = 'wmdeditor' LIMIT 1; [0.0002]
* SELECT `version` FROM `sym_extensions` WHERE `name` = 'wmdeditor' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_mediathek` WHERE `field_id` = '28' LIMIT 1; [0.0003]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '48' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_textarea` WHERE `field_id` = '93' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_select` WHERE `field_id` = '118' LIMIT 1; [0.0003]
* SELECT * FROM `sym_fields_upload` WHERE `field_id` = '43' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '49' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_textarea` WHERE `field_id` = '94' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '50' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '66' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_select` WHERE `field_id` = '95' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '51' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_memberlink` WHERE `field_id` = '106' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '96' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '52' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_date` WHERE `field_id` = '97' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '53' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '98' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '54' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '99' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '55' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_select` WHERE `field_id` = '100' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '56' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_select` WHERE `field_id` = '101' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '57' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_memberlink` WHERE `field_id` = '108' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '58' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_textarea` WHERE `field_id` = '59' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_upload` WHERE `field_id` = '60' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_systemid` WHERE `field_id` = '61' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '63' LIMIT 1; [0.0002]
* SELECT * FROM `sym_fields_input` WHERE `field_id` = '64' LIMIT 1; [0.0001]
* SELECT * FROM `sym_fields_selectbox_link` WHERE `field_id` = '68' LIMIT 1; [0.0001]
* SELECT `id` FROM `sym_sections` WHERE `handle` = 'General-Blog' LIMIT 1; [0.0001]

Hey Guys Im having a fatal error and Im not sure why.

What are you trying to do? symphony - eventex version?

Regarding modifications to the EventEx extension, I was just concerned about pulling code into an ensemble project that will be shared publicly. For this, the code needs to be right, but I myself wouldn’t know the difference.

But that leads to the original problem. As long as no one tests possible fixes, things are unlikely to change. In the worst case, you had spent some of your time hoping to have found a solution to your problem. That should be acceptable from my point of view, obviously not when releasing something to the world.

alpacaaa, I’ll definitely be testing your solution, when I get to that point. First, I’m going to trying things out in 2.0.6, to figure out how it all works, then upgrade to 2.0.7 and see how things go.

2.07 and latest eventex, and frontend membership

just trying to create a new entry and edit an existing one at the same time. Following the how to in the readme

Here is my form

                 <form method="post" action="" enctype="multipart/form-data">
                <fieldset>
                  <legend>Leave a Comment</legend>

                  &lt;script type="text/javascript">
    $().ready(function() {
        $("textarea").wmd({
            "preview": true,
            "helpLink": "http://daringfireball.net/projects/markdown/",
            "helpHoverTitle": "Markdown Help",
        });
    });
    &lt;/script>
                  <label>
                    <textarea name="comments[comment]" id="myTextarea" style="width: 610px; height: 150px;"></textarea>
                  </label>
                  <br />
                  <label>Attach File: (5mb max)

      <input name="comments[fileupload]" id="comments-fileupload" title="" class="" type="file" value="" /><br /></label>
                  <input name="comments[post-id]" id="comments-post-id" title="" class="" type="hidden" value="258" />

                  <input name="comments[author]" id="comments-author" title="" class="" type="hidden" value="jeff" />
                  <input name="general-blog[order-date]" type="hidden" value="" />
                  <input name="general-blog[title]" type="hidden" value="sdfs" />
                  <input name="general-blog[content]" type="hidden" value="df" />
                  <input name="general-blog[authorroll]" type="hidden" value="" />
                  <input name="general-blog[author]" type="hidden" value="jeff" />
                  <input name="general-blog[date]" type="hidden" value="2010-03-07" />
                  <input name="general-blog[blogid]" type="hidden" value="" />
                  <input type="hidden" name="general-blog[system:id]" value="258" />

                  <input name="redirect" type="hidden" value="http://phoenixacademy.ca/palsintouch/general/258" />
                  <input name="action[save-comment]" type="submit" value="Submit" />
                </fieldset>
              </form>

Could you also post the PHP of your Event please?

I was trying to figure out EventEx using Symphony 2.0.6. I set up my sections, created the form, modified my event as per the EventEx instructions and encountered this error when submitting my form:

Fatal error: Access to undeclared static property: Symphony::$Configuration in /Users/stephen/Sites/sym/form-builder/extensions/asdc/lib/class.asdc.php on line 33

I was stumped until I had the thought that the version of the ASDC extension expected by EventEx might not be the version that I had (version 1.3). I had included the extension by cloning from GitHub:

cd extensions
git clone git://github.com/pointybeard/asdc.git

So, I changed directories and displayed a log of the recent commits

cd asdc
git log

When EventEx was created, it would have been using the previous version: version 1.2. So, I checked out this commit and saved the unnamed branch as version1.2

git checkout b2c50769eea
git checkout -b version1.2

After making this change, I was able to successfully create entries with EventEx. Woot!

The unfortunate consequence of EventEx requiring ASDC version 1.2 is that, I believe, the official Members extension requires ASDC version 1.3, rendering EventEx and Members incompatible.

I copy and pasted the PHP from the instructions and changed the names of the sections and of the event name. I am using members and asdc 1.3 so perhaps thats whats wrong.

<?php
require_once(EXTENSIONS . '/eventex/lib/class.eventex.php');

Class eventsave_comment extends EventEx
{      
  // Should return an array of section handles
  public static function getSource()
  {
    return array("General-Blog", "Comments");
  }

  public static function about(){
    return array(
         'name' => 'save comment',
         'author' => array(
            'name' => 'Yo' Momma',
            'website' => 'http://symphony2',
            'email' => 'email.address@server'),
         'version' => '1.0',
         'release-date' => '2009-01-21T10:41:52+00:00',
         'trigger-condition' => 'action[save_comment]');  
  }

  protected function __trigger()
  {        
    // this returns a Symphony XMlElement object
    $result = $this->updateNamedSections(self::getSource());    

    return $result;
  }    
}

Maybe it has to do with your section handles not actually being “handlized”. What happens if you change this (upper and lowercase):

array(“General-Blog”, “Comments”);

to this (lowercase only):

array(“general-blog”, “comments”);

Also, your trigger-condition is not in the correct form. Change the underscore to a hyphen.

 'trigger-condition' => 'action[save-comment]'

Here’s what mine looks like:

<?php

    require_once(EXTENSIONS . '/eventex/lib/class.eventex.php');

    Class eventsave_project_user extends EventEx {

        public static function getSource(){
            return array("projects", "users");
        }

        public static function about(){
            return array(
                     'name' => 'Save Project User',
                     'author' => array(
                            'name' => 'Stephen Bau',
                            'website' => 'http://home/sym/form-builder',
                            'email' => 'bauhouse@gmail.com'),
                     'version' => '1.0',
                     'release-date' => '2010-03-13T17:27:07+00:00',
                     'trigger-condition' => 'action[save-project-user]');   
        }

        // When the documentation method is not included, viewing the event results in a blank page, so...
        public static function documentation(){
            return '
        <h3>An EventEx Event</h3>
        <p>To demonstrate the ability to save entries to multiple sections (in this case, Projects and Users) using the EventEx extension.</p>';
        }

        protected function __trigger(){
            // this returns a Symphony XMlElement object
            $result = $this->updateNamedSections(self::getSource());

            return $result;
        }       

    }

By the way, I’m putting together an ensemble that demonstrates how to use Form Controls, Section Schemas and EventEx to automatically build front end forms. It’s a work in progress, but here’s where I’m at so far: Symphony Form Builder Ensemble.

I’ve just updated the Form Builder ensemble with similar sections to those being used by the Bugaroo ensemble. So far, most of the forms are being dynamically generated with Section Schemas and Form Controls.

Good stuff Stephen :-) Can we keep this thread for EventEx only please?

Looks like I need to take a deeper look at EventEx and figure out what these bugs are about.

Jeff, in addition to handle-ising your section names, can you confirm whether you have a load() function in your event? This load function should be a one-liner to check whether $_POST['action']['save-comment'] has been set, and to call the internal _trigger() if true.

Ill try this stuff out tomorrow thanks a lot guys.

Ignore my last comment — you don’t need to include a load function since EventEx determines this for you. In fact, you don’t need a trigger-condition in the about() array either, that’s just for visual documentation.

If you don’t overload the trigger and/or load methods in your event, EventEx doesn’t care: it will use the name of the Event PHP file for the root element name and trigger condition.

For example if you name your event event.update_blog.php then the trigger condition would be action[update-blog] and the root element of the XML output would be <update-blog>. Of course, you can change with by overriding the appropriate properties/methods in your event.

The unfortunate consequence of EventEx requiring ASDC version 1.2 is that, I believe, the official Members extension requires ASDC version 1.3, rendering EventEx and Members incompatible.

In which case we should definitely update EventEx to use ASDC 1.3. In fact, the dependency isn’t with EventEx but the DatabaseManipulator class. This is itself no longer actively developed (having been superceded by SymQL and others) so it would be prudent to remove the DatabaseManipulator/ASDC dependency entirely. It’s a quick change, and means EventEx is dependency-free.

I don’t think my once-colleague Your Hero Paul is actively supporting EventEx, so I’ll see what I can do about updating this myself.

so I’ll see what I can do about updating this myself.

Any chances you will accept contributions? :)

Any chances you will accept contributions? :)

Of course :-) I haven’t really been taking this thread in, only glancing at the comments. This evening I found time to try out a few examples with 2.0.7 and I hit all of the bugs above which I believe I have now squashed.

http://github.com/nickdunn/eventex

If this can be confirmed, I’ll contact yourheropaul to see how these can be integrated into the master repo (or whether he wants us to maintain it altogether).

Great job! What about post-values being outputted twice in XML? Are you able to confirm the issue with 2.0.7?

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