mazedigital / association_output

Association Output for Symphony: Inline XML
MIT License
5 stars 4 forks source link

Call to a member function getChildren() on a non-object #7

Closed jdsimcoe closed 10 years ago

jdsimcoe commented 10 years ago

So I enabled the newest version of Cacheabledatasource and association_output now throws this error:

18 August 2014 11:39 > Fatal Error: GenericExceptionHandler 1: Call to a member function getChildren() on a non-object on line 424 of file /Users/jdsimcoe/Sites/atheycreek/extensions/association_output/extension.driver.php
nilshoerrmann commented 10 years ago

Sounds like Cacheable Data Source returns plain XML instead of an XMLElement. Maybe @brendo knows more?

nilshoerrmann commented 10 years ago

Does this commit, https://github.com/hananils/association_output/commit/324c0887979a150f79a6c9c73be564e68922c743, help?

jdsimcoe commented 10 years ago

Actually, it now spits out this error:

Symphony Warning: Missing argument 2 for XMLElement::convertFromXMLString(), called in /Users/jdsimcoe/Sites/atheycreek/extensions/association_output/extension.driver.php on line 303 and defined
An error occurred in /Users/jdsimcoe/Sites/atheycreek/symphony/lib/toolkit/class.xmlelement.php around line 842
837 * @param string $root_element
838 * @param string $xml
839 * A string of XML
840 * @return XMLElement
841 */
842 public static function convertFromXMLString($root_element, $xml)
843 {
844 $doc = new DOMDocument('1.0', 'utf-8');
845 $doc->loadXML($xml);
846
Backtrace
[/Users/jdsimcoe/Sites/atheycreek/symphony/lib/toolkit/class.xmlelement.php:842]
    GenericErrorHandler::handler();
[/Users/jdsimcoe/Sites/atheycreek/extensions/association_output/extension.driver.php:303]
    XMLElement::convertFromXMLString();
[/Users/jdsimcoe/Sites/atheycreek/symphony/lib/toolkit/class.extensionmanager.php:710]
    extension_association_output->appendAssociatedEntries();
[/Users/jdsimcoe/Sites/atheycreek/symphony/lib/toolkit/class.frontendpage.php:921]
    ExtensionManager::notifyMembers();
[/Users/jdsimcoe/Sites/atheycreek/symphony/lib/toolkit/class.frontendpage.php:464]
    FrontendPage->processDatasources();
[/Users/jdsimcoe/Sites/atheycreek/symphony/lib/toolkit/class.frontendpage.php:195]
    FrontendPage->__buildPage();
[/Users/jdsimcoe/Sites/atheycreek/symphony/lib/core/class.frontend.php:110]
    FrontendPage->generate();
[/Users/jdsimcoe/Sites/atheycreek/symphony/lib/boot/func.utilities.php:231]
    Frontend->display();
[/Users/jdsimcoe/Sites/atheycreek/symphony/lib/boot/func.utilities.php:207]
    symphony_launcher();
[/Users/jdsimcoe/Sites/atheycreek/index.php:14]
    symphony();
Database Query Log
[0.0002] SET character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8';
[0.0001] SET CHARACTER SET 'utf8';
[0.0001] SET time_zone = '-07:00';
[0.0012] SELECT SQL_CACHE t1.name, t2.page, t2.delegate, t2.callback FROM `sym_extensions` as t1 INNER JOIN `sym_extensions_delegates` as t2 ON t1.id = t2.extension_id WHERE t1.status = 'enabled' ORDER BY t2.delegate, t1.name;
[0.0003] SELECT SQL_CACHE `session_data` FROM `sym_sessions` WHERE `session` = 'dia9d1ahee7mc65th7osea1qq1' LIMIT 1;
[0.0002] SELECT SQL_CACHE a.* FROM `sym_authors` AS `a` WHERE `username` = 'jdsimcoe' ORDER BY a.id ASC LIMIT 1;
[0.0002] UPDATE sym_authors SET `last_seen` = '2014-09-15 15:19:03' WHERE `id` = 4;
[0.0004] SELECT SQL_CACHE `p`.* FROM `sym_pages` AS `p` LEFT JOIN `sym_pages_types` AS `pt` ON (p.id = pt.page_id) WHERE `pt`.type = 'index';
[0.0002] SELECT SQL_CACHE type FROM `sym_pages_types` AS pt WHERE pt.page_id = 1 GROUP BY pt.type ORDER BY pt.type ASC;
[0.0003] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`type` = 'memberrole' ORDER BY t1.`sortorder` ASC;
[0.0003] SELECT SQL_CACHE s.* FROM `sym_gpl_sets` AS s ORDER BY s.name ASC;
[0.0002] SELECT SQL_CACHE s.* FROM `sym_gpl_sets` AS s WHERE s.id = 3 LIMIT 1;
[0.0003] SELECT SQL_CACHE c.* FROM `sym_gpl_params` AS c WHERE c.set_id = 3 ORDER BY c.sortorder ASC;
[0.0002] SELECT SQL_CACHE s.* FROM `sym_gpl_sets` AS s WHERE s.id = 1 LIMIT 1;
[0.0002] SELECT SQL_CACHE s.* FROM `sym_gpl_sets` AS s WHERE s.id = 2 LIMIT 1;
[0.0002] SELECT SQL_CACHE s.* FROM `sym_gpl_sets` AS s WHERE s.id = 4 LIMIT 1;
[0.0003] SELECT SQL_CACHE `name` FROM `sym_extensions` WHERE `status` = 'enabled';
[0.0003] SELECT SQL_CACHE `s`.* FROM `sym_sections` AS `s` WHERE `s`.`id` IN (26);
[0.0002] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(263,227,221);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_checkbox` WHERE `field_id` IN (221,227);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_datetime` WHERE `field_id` IN (263);
[0.0005] SELECT SQL_CACHE DISTINCT `e`.id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date`, UNIX_TIMESTAMP(e.`modification_date`) AS `modification_date` FROM `sym_entries` AS `e` LEFT JOIN `sym_entries_data_263` AS `t263` ON `e`.`id` = `t263`.entry_id LEFT JOIN `sym_entries_data_227` AS t227_1 ON (e.id = t227_1.entry_id) LEFT JOIN `sym_entries_data_221` AS t221_1 ON (e.id = t221_1.entry_id) WHERE 1 AND `e`.`section_id` = 26 AND (((`t263`.start BETWEEN '2014-09-15 15:19:04' AND '9999-12-31 23:59:59') OR (`t263`.end BETWEEN '2014-09-15 15:19:04' AND '9999-12-31 23:59:59') OR (`t263`.start < '2014-09-15 15:19:04' AND `t263`.end > '9999-12-31 23:59:59'))) AND (t227_1.value IN ('yes')) AND ( t221_1.value IN ('no') OR t221_1.value IS null ) ORDER BY `e`.`id`DESC;
[0.0004] SELECT SQL_CACHE COUNT(DISTINCT `e`.id) as `count` FROM `sym_entries` AS `e` LEFT JOIN `sym_entries_data_263` AS 
nilshoerrmann commented 10 years ago

Sorry for the inconvenience, there was a variable missing. Nevertheless, even with that fixed, it doesn't seem to work as intended due to the way Cacheable Data Source works: it does always hook into the output before the Data Sources have actually been executed with the result that it's not possible for any other extension to adjust the output before it is cached.

This is either a Cacheable Data Sources bug or a conceptual flaw that makes both extensions incompatible. At least there seems to be nothing we can do on this end.

Would you mind reposting this issue on the Cacheable Data Sources tracker? Thanks!

jdsimcoe commented 10 years ago

The extensions work perfectly in harmony for me. I'm not seeing any errors thrown, and the XML output has a cache-age parameter set that seems to be all working. Data sources seem to be working great. Was there an error you found on your end when testing this?

nilshoerrmann commented 10 years ago

The error you posted is still unfixed.

jdsimcoe commented 10 years ago

Ok. I'm still getting an error:

Fatal error: Call to a member function getIterator() on a non-object in /Users/jdsimcoe/Sites/atheycreek/extensions/association_output/extension.driver.php on line 421

I'll move this to the Cacheable Datasource Issues page.

nilshoerrmann commented 10 years ago

Thanks!