Open exse2 opened 2 years ago
I think I may have the same problem. No errors are logged but nothing is output.
@exse2 Thanks for the idea, your issue actually is the only help I could find for using renderResources
with ModX 3. However, adding the new classes does not fix the issue. There is absolutely no output at all generated by renderResources
. I already cleared cache multiple times, tried to add static output to snippet.renderresources.php
, but my changes have no effect. The only thing thats working is adding [[renderResources:default=`A fallback message`]]
, then A fallback message
is returned. Any ideas? Thanks :)
Hello.
After Upgrading to MODX 3, my site_content.class_key content switched from "modDocument" to "MODX\Revolution\modDocument". Alas,
[[!renderResources? &showHidden=`1` &where=`{"hidemenu:=":1}` &sortby=`{"menuindex":"ASC"}` &limit=`0` &depth=`0` &debug=`true` ]]
does not work anymore because it wants to do:
SELECT `modResource`.`id` AS `modResource_id`, `modResource`.`type` AS `modResource_type`, `modResource`.`pagetitle` AS `modResource_pagetitle`, `modResource`.`longtitle` AS `modResource_longtitle`, `modResource`.`description` AS `modResource_description`, `modResource`.`alias` AS `modResource_alias`, `modResource`.`link_attributes` AS `modResource_link_attributes`, `modResource`.`published` AS `modResource_published`, `modResource`.`pub_date` AS `modResource_pub_date`, `modResource`.`unpub_date` AS `modResource_unpub_date`, `modResource`.`parent` AS `modResource_parent`, `modResource`.`isfolder` AS `modResource_isfolder`, `modResource`.`introtext` AS `modResource_introtext`, `modResource`.`content` AS `modResource_content`, `modResource`.`richtext` AS `modResource_richtext`, `modResource`.`template` AS `modResource_template`, `modResource`.`menuindex` AS `modResource_menuindex`, `modResource`.`searchable` AS `modResource_searchable`, `modResource`.`cacheable` AS `modResource_cacheable`, `modResource`.`createdby` AS `modResource_createdby`, `modResource`.`createdon` AS `modResource_createdon`, `modResource`.`editedby` AS `modResource_editedby`, `modResource`.`editedon` AS `modResource_editedon`, `modResource`.`deleted` AS `modResource_deleted`, `modResource`.`deletedon` AS `modResource_deletedon`, `modResource`.`deletedby` AS `modResource_deletedby`, `modResource`.`publishedon` AS `modResource_publishedon`, `modResource`.`publishedby` AS `modResource_publishedby`, `modResource`.`menutitle` AS `modResource_menutitle`, `modResource`.`donthit` AS `modResource_donthit`, `modResource`.`privateweb` AS `modResource_privateweb`, `modResource`.`privatemgr` AS `modResource_privatemgr`, `modResource`.`content_dispo` AS `modResource_content_dispo`, `modResource`.`hidemenu` AS `modResource_hidemenu`, `modResource`.`class_key` AS `modResource_class_key`, `modResource`.`context_key` AS `modResource_context_key`, `modResource`.`content_type` AS `modResource_content_type`, `modResource`.`uri` AS `modResource_uri`, `modResource`.`uri_override` AS `modResource_uri_override`, `modResource`.`hide_children_in_tree` AS `modResource_hide_children_in_tree`, `modResource`.`show_in_tree` AS `modResource_show_in_tree`, `modResource`.`properties` AS `modResource_properties`, `modResource`.`alias_visible` AS `modResource_alias_visible` FROM `site_content` AS `modResource` JOIN `content_type` `ContentType` ON ( `ContentType`.`binary` = '' AND ContentType.id = modResource.content_type ) WHERE ( ( modResource.parent IN (6187) AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND `modResource`.`class_key` IN ('modDocument', 'modStaticResource') ) AND `modResource`.`hidemenu` = 1 ) ORDER BY menuindex ASC
which yields nothing anymore because of "in("modDocument",..).
Proposed fix:
Change
$criteria['class_key:IN'] = array('modDocument', 'modStaticResource');
to
$criteria['class_key:IN'] = array('modDocument', 'modStaticResource', 'MODX\\Revolution\\modDocument', 'MODX\\Revolution\\modStaticResource');
this is a perfect solution for this issue, I have just done the same on MODX3 and PHP8 both locally in Docker and live site - works fine.
Hello.
After Upgrading to MODX 3, my site_content.class_key content switched from "modDocument" to "MODX\Revolution\modDocument". Alas,
does not work anymore because it wants to do:
which yields nothing anymore because of "in("modDocument",..).
Proposed fix:
Change
to