Search

I'm not 100% sure, but I don't think the entry/@id needs to be wrapper in curly braces.

That might be your issue.

Ah exactly!

Does the reflection XSLT utility use the fully resolved XML from the frontend page or is it generated in another way?

Having trouble accessing field data from Parent field.

No, it will take the current entry object and only generate that entry wrapped inside a data node.

Worth mentioning again, @bzerangue, XSLT utility must wrap response with <data>.

<xsl:template match="data/entry/photos/item">
    <data>
        <item>
            <xsl:choose>
                <xsl:when test="@id = ''">
                    <xsl:text>No</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:text>Yes</xsl:text>
                </xsl:otherwise>
            </xsl:choose>
        </item>
    </data>
</xsl:template>

Worth mentioning again, @bzerangue, XSLT utility must wrap response with .

So that's why I never managed to get it working ... :)

I'm having some trouble using Reflection field with EXSL Function Manager. My function does not have a problem, because I can use it on a normal page. It sounds like it has a problem with <xsl:include href="efm://functions"/>??

Symphony Warning: XSLTProcessor::importStylesheet(): Unable to find the wrapper "efm" - did you forget to enable it when you configured PHP?

An error occurred in /Applications/MAMP/htdocs/XXX/extensions/reflectionfield/extension.driver.php around line 126

121                     $XSLProc = new XsltProcessor;
122
123                     $xslt = new DomDocument;
124                     $xslt->load($XSLTfilename);
125
126                     $XSLProc->importStyleSheet($xslt);
127
128                     // Set some context
129                     $XSLProc->setParameter('', array(
130                         'section-handle' => $section->get('handle'),
Backtrace
[:0]
    GenericErrorHandler::handler();
[/Applications/MAMP/htdocs/XXX/extensions/reflectionfield/extension.driver.php:126]
    XSLTProcessor->importStylesheet();
[/Applications/MAMP/htdocs/XXX/extensions/reflectionfield/fields/field.reflection.php:308]
    Extension_ReflectionField->getXPath();
[/Applications/MAMP/htdocs/XXX/extensions/reflectionfield/extension.driver.php:165]
    FieldReflection->compile();
[/Applications/MAMP/htdocs/XXX/symphony/lib/toolkit/class.extensionmanager.php:603]
    Extension_ReflectionField->compileBackendFields();
[/Applications/MAMP/htdocs/XXX/symphony/content/content.publish.php:1075]
    ExtensionManager::notifyMembers();
[/Applications/MAMP/htdocs/XXX/symphony/content/content.publish.php:76]
    contentPublish->__actionEdit();
[/Applications/MAMP/htdocs/XXX/symphony/content/content.publish.php:62]
    contentPublish->__switchboard();
[/Applications/MAMP/htdocs/XXX/symphony/lib/toolkit/class.administrationpage.php:414]
    contentPublish->action();
[/Applications/MAMP/htdocs/XXX/symphony/lib/core/class.administration.php:254]
    AdministrationPage->build();
[/Applications/MAMP/htdocs/XXX/symphony/lib/core/class.administration.php:442]
    Administration->__buildPage();
[/Applications/MAMP/htdocs/XXX/index.php:22]
    Administration->display();
Database Query Log
[0.0001] SET character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8';
[0.0001] SET CHARACTER SET 'utf8';
[0.0017] 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.0005] SELECT SQL_CACHE `session_data` FROM `sym_sessions` WHERE `session` = '9NrWNzYuMI6aE1I4VO63u0' LIMIT 1;
[0.0003] SELECT SQL_CACHE a.* FROM `sym_authors` AS `a` WHERE `username` = 'Pat' ORDER BY a.id ASC LIMIT 1;
[0.0003] UPDATE sym_authors SET `last_seen` = '2013-07-06 15:52:33' WHERE `id` = 1;
[0.0004] SELECT SQL_CACHE `name` FROM `sym_extensions` WHERE `status` = 'enabled';
[0.0004] SELECT SQL_CACHE * FROM `sym_extensions`;
[0.0004] SELECT SQL_CACHE `s`.* FROM `sym_sections` AS `s` ORDER BY `s`.`sortorder` asc;
[0.0004] SELECT SQL_CACHE `id` FROM `sym_sections` WHERE `handle` = 'listings' LIMIT 1;
[0.0003] SELECT SQL_CACHE count(`e`.id) as `count` FROM `sym_entries` AS `e` WHERE `e`.`section_id` = '7';
[0.0003] SELECT SQL_CACHE `id` FROM `sym_sections` WHERE `handle` = 'listings' LIMIT 1;
[0.0003] SELECT SQL_CACHE `id`, `element_name`, `type`, `location` FROM `sym_fields` WHERE `parent_section` = 7 ORDER BY `sortorder` ASC;
[0.0003] SELECT SQL_CACHE `section_id` FROM `sym_entries` WHERE `id` = '1333' LIMIT 1;
[0.0003] SELECT SQL_CACHE `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` WHERE 1 AND `e`.`id` IN ('1333') AND `e`.`section_id` = '7';
[0.0003] SELECT SQL_CACHE `id` FROM `sym_fields` WHERE `parent_section` = 7 ORDER BY `sortorder` ASC;
[0.0002] SELECT SQL_CACHE * FROM `sym_entries_data_45` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_50` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_85` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_47` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_48` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_26` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_23` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_97` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_29` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_44` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_87` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_88` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_62` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_46` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_63` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_72` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_33` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_64` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_89` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_93` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_164` WHERE `entry_id` IN (1333) ORDER BY `id` ASC;
[0.0002] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(45);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (45);
[0.0002] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(50);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_checkbox` WHERE `field_id` IN (50);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(85);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_selectbox_link` WHERE `field_id` IN (85);
[0.0002] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(47);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_textbox` WHERE `field_id` IN (47);
[0.0002] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(48);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_textbox` WHERE `field_id` IN (48);
[0.0003] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(26);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_date` WHERE `field_id` IN (26);
[0.0002] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(23);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (23);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(97);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (97);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(29);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_datetime` WHERE `field_id` IN (29);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(44);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_number` WHERE `field_id` IN (44);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(87);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_addresslocation` WHERE `field_id` IN (87);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(88);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (88);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(62);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (62);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(46);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_incrementnumber` WHERE `field_id` IN (46);
[0.0002] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(63);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (63);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(72);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (72);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(33);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (33);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(64);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (64);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(89);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (89);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(93);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_selectbox_link` WHERE `field_id` IN (93);
[0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(164);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (164);
[0.0002] SELECT SQL_CACHE `id`, `element_name`, `type`, `location` FROM `sym_fields` WHERE `parent_section` = 7 ORDER BY `sortorder` ASC;
[0.0002] SELECT SQL_CACHE f.id FROM `sym_entries_data_47` AS f WHERE f.handle = 'testing-again' AND f.entry_id != '1333' LIMIT 1;
[0.0001] SELECT SQL_CACHE f.id FROM `sym_entries_data_47` AS f WHERE f.entry_id = '1333' AND f.value = 'Testing again' AND f.handle = 'testing-again' LIMIT 1;
[0.0001] SELECT SQL_CACHE f.id FROM `sym_entries_data_47` AS f WHERE f.handle = 'testing-again-2' AND f.entry_id != '1333' LIMIT 1;
[0.0001] SELECT SQL_CACHE f.id FROM `sym_entries_data_47` AS f WHERE f.handle = 'testing-again-3' AND f.entry_id != '1333' LIMIT 1;
[0.0001] SELECT SQL_CACHE f.id FROM `sym_entries_data_47` AS f WHERE f.handle = 'testing-again-4' AND f.entry_id != '1333' LIMIT 1;
[0.0003] SELECT SQL_CACHE f.id FROM `sym_entries_data_48` AS f WHERE f.handle = '' AND f.entry_id != '1333' LIMIT 1;
[0.0006] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`parent_section` = '7' ORDER BY t1.`sortorder` ASC;
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (45,164);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_checkbox` WHERE `field_id` IN (50);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_selectbox_link` WHERE `field_id` IN (85,93);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_textbox` WHERE `field_id` IN (47,48);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_date` WHERE `field_id` IN (26);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (23,97,88,62,63,72,33,64,89);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_datetime` WHERE `field_id` IN (29);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_number` WHERE `field_id` IN (44);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_addresslocation` WHERE `field_id` IN (87);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_incrementnumber` WHERE `field_id` IN (46);
[0.0001] UPDATE sym_entries SET `modification_date` = '2013-07-06 15:52:33', `modification_date_gmt` = '2013-07-06 19:52:33' WHERE `id` = 1333;
[0.0001] DELETE FROM sym_entries_data_45 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_45` (`entry_id`, `handle`, `value`, `value_formatted`) VALUES ('1333', NULL, NULL, NULL);
[0.0001] DELETE FROM sym_entries_data_50 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_50` (`entry_id`, `value`) VALUES ('1333', 'no');
[0.0001] DELETE FROM sym_entries_data_85 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_85` (`entry_id`, `relation_id`) VALUES ('1333', '21');
[0.0002] DELETE FROM sym_entries_data_47 WHERE `entry_id` = 1333;
[0.0002] INSERT INTO `sym_entries_data_47` (`entry_id`, `handle`, `value`, `value_formatted`, `word_count`) VALUES ('1333', 'testing-again-4', 'Testing again', 'Testing again', '2');
[0.0002] DELETE FROM sym_entries_data_48 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_48` (`entry_id`, `handle`, `value`, `value_formatted`, `word_count`) VALUES ('1333', NULL, NULL, 'n', '0');
[0.0001] DELETE FROM sym_entries_data_26 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_26` (`entry_id`, `value`, `date`) VALUES ('1333', '2013-07-03T11:25:00-04:00', '2013-07-03 15:25:00');
[0.0001] DELETE FROM sym_entries_data_23 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_23` (`entry_id`, `value`, `handle`) VALUES ('1333', 'Private room', 'private-room');
[0.0001] DELETE FROM sym_entries_data_97 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_97` (`entry_id`, `value`, `handle`) VALUES ('1333', '1 bedroom', '1-bedroom');
[0.0001] DELETE FROM sym_entries_data_29 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_29` (`entry_id`, `start`, `end`) VALUES ('1333', '2013-07-01 15:52:33', '2013-07-31 15:52:33');
[0.0001] DELETE FROM sym_entries_data_44 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_44` (`entry_id`, `value`) VALUES ('1333', '1500');
[0.0002] DELETE FROM sym_entries_data_87 WHERE `entry_id` = 1333;
[0.0002] INSERT INTO `sym_entries_data_87` (`entry_id`, `street`, `city`, `region`, `postal_code`, `country`, `latitude`, `longitude`, `street_handle`, `city_handle`, `region_handle`, `postal_code_handle`, `country_handle`) VALUES ('1333', '350 W 37th St', NULL, NULL, '10018', NULL, '40.7549387', '-73.9944294', '350-w-37th-st', NULL, NULL, '10018', NULL);
[0.0001] DELETE FROM sym_entries_data_88 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_88` (`entry_id`, `value`, `handle`) VALUES ('1333', 'Manhattan', 'manhattan');
[0.0001] DELETE FROM sym_entries_data_62 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_62` (`entry_id`, `value`, `handle`) VALUES ('1333', 'Female', 'female');
[0.0001] DELETE FROM sym_entries_data_46 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_46` (`entry_id`, `value`) VALUES ('1333', '2');
[0.0003] DELETE FROM sym_entries_data_63 WHERE `entry_id` = 1333;
[0.0002] INSERT INTO `sym_entries_data_63` (`entry_id`, `value`, `handle`) VALUES ('1333', 'Electricity', 'electricity'), ('1333', 'Water', 'water'), ('1333', 'Gas', 'gas'), ('1333', 'Internet/TV', 'internet-tv');
[0.0002] DELETE FROM sym_entries_data_72 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_72` (`entry_id`, `value`, `handle`) VALUES ('1333', 'A/C', 'a-c'), ('1333', 'Heat', 'heat');
[0.0001] DELETE FROM sym_entries_data_33 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_33` (`entry_id`, `value`, `handle`) VALUES ('1333', 'Shared', 'shared');
[0.0002] DELETE FROM sym_entries_data_64 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_64` (`entry_id`, `value`, `handle`) VALUES ('1333', 'In unit', 'in-unit'), ('1333', 'In building', 'in-building');
[0.0001] DELETE FROM sym_entries_data_89 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_89` (`entry_id`, `value`, `handle`) VALUES ('1333', NULL, NULL);
[0.0001] DELETE FROM sym_entries_data_93 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_93` (`entry_id`, `relation_id`) VALUES ('1333', '1335'), ('1333', '1334'), ('1333', '1332');
[0.0001] DELETE FROM sym_entries_data_164 WHERE `entry_id` = 1333;
[0.0001] INSERT INTO `sym_entries_data_164` (`entry_id`, `handle`, `value`, `value_formatted`) VALUES ('1333', NULL, NULL, NULL);
[0.0002] SELECT SQL_CACHE DISTINCT `child_section_id` value, `parent_section_id` value FROM `sym_sections_association` WHERE `parent_section_id` = 7 OR `child_section_id` = 7;
[0.0003] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND id IN (124) ORDER BY t1.`sortorder` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (124);
[0.0002] SELECT SQL_CACHE e.id, e.section_id, s.name, s.handle FROM `sym_entries` AS `e` LEFT JOIN `sym_sections` AS `s` ON (s.id = e.section_id) WHERE e.id IN (21);
[0.0003] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`parent_section` = '9' AND t1.show_column = 'yes' ORDER BY t1.`sortorder` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_uniqueinput` WHERE `field_id` IN (73);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_date` WHERE `field_id` IN (96);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (124);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_textbox` WHERE `field_id` IN (67);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_enhancedtaglist` WHERE `field_id` IN (75);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_checkbox` WHERE `field_id` IN (131);
[0.0003] SELECT SQL_CACHE `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` WHERE 1 AND `e`.`id` IN ('21') AND `e`.`section_id` = '9' ORDER BY ( SELECT `ed`.value FROM sym_entries_data_73 AS `ed` WHERE entry_id = e.id ) ASC;
[0.0004] SELECT SQL_CACHE `id` FROM `sym_fields` WHERE 1 AND `parent_section` = 9 AND `element_name` IN ('name') ORDER BY `sortorder` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_entries_data_124` WHERE `entry_id` IN (21) ORDER BY `id` ASC;
[0.0003] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND id IN (91) ORDER BY t1.`sortorder` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_fields_uniqueupload` WHERE `field_id` IN (91);
[0.0002] SELECT SQL_CACHE e.id, e.section_id, s.name, s.handle FROM `sym_entries` AS `e` LEFT JOIN `sym_sections` AS `s` ON (s.id = e.section_id) WHERE e.id IN (1335,1334,1332);
[0.0002] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(90);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (90);
[0.0002] SELECT SQL_CACHE `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` WHERE 1 AND `e`.`id` IN ('1332', '1334', '1335') AND `e`.`section_id` = '10' ORDER BY ( SELECT `ed`.value FROM sym_entries_data_90 AS `ed` WHERE entry_id = e.id ) DESC;
[0.0002] SELECT SQL_CACHE `id` FROM `sym_fields` WHERE 1 AND `parent_section` = 10 AND `element_name` IN ('image') ORDER BY `sortorder` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_entries_data_91` WHERE `entry_id` IN (1335,1334,1332) ORDER BY `id` ASC;
[0.0003] UPDATE sym_entries_data_45 SET `handle` = '0001333', `value` = '0001333', `value_formatted` = '0001333' WHERE `entry_id` = '1333';

Is EXSL Function Manager an extension?

The reflection field just builds the entry object and processes any attached xslt or xpaths. It doesn't use any other extensions during it's process.

The EXSL Function Manager works in the XSL, and Reflection Field also processes the XSLT, so it seems like it should work.

It would work in the xsl for any template on the frontend, but for the Reflection Field, it creates it's own XSLTProcessor instance to process attached xslt.

It doesn't use any of the Frontend or XSLTPage processes and therefore doesn't fire any associated delegates, which the EXSL Function Manager will listen to.

Is it possible to modify the extension to use the delegates then?

It would be a matter of looking where, in the EXSL manager, it subscribes to delegates, and mirroring this delegate from the core into the Reflection Field.

It could get tricky though.

It looks like it subscribes to FrontendOutputPreGenerate. So I'm guessing the Reflection Field needs to call this delegate?

Class extension_EXSL_Function_Manager extends Extension{

    public function getSubscribedDelegates(){
        return array(
            array(
                'page' => '/frontend/',
                'delegate' => 'FrontendOutputPreGenerate',
                'callback' => 'initFunctionManager'
            )
        );
    }

    public function initFunctionManager($context){
        $Manager = new FunctionManager($context);
        $Manager->createDelegate();
        $Manager->createStream();
    }
}

The danger there is if any other extensions call that delegate, you could have a messy result.

Why is that? I just want Reflection Field to perform the callback for EXSL Function Manager.

Or maybe Reflection Field could be changed to process the XSLT through Symphony instead of its own XSLTProcessor?

@Pat, it has its own XSLT processor; as it generates the values when you save the entry; not when you display the datasources.

@gunglien: designermonkey already mentioned that before. However, I want it to act like a regular XSLT utility or page that works with EXSL Function Manager so that I can use functions in my XSL.

For anyone who is wondering, I worked around the issue by modifying the Reflection field

                $XSLProc = new XsltProcessor;

to $XSLProc = new XsltProcessor; $XSLProc->registerPHPFunctions();

Then in the utility, declare the php namespace

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:php="http://php.net/xsl">

and then you can use the function

        <xsl:value-of select="php:function('extension_exslfunctionextensionname::coolfunction',$input)"/>

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