We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38000
    • 19 Posts
    On our homepage we have different getResources calls listed. They use an offset and totalVar for only loading specific items. When we turn on debug, we get errors in return moaning about the wrong context. I tried to set the filter "contet = web" but that did not change a thing.

    A getResources call looks like this:

    [[!getResources?
    	     &parents=`15997,16004,16005,16006,16007,16008,16009,16010`
    	     &depth=`0`
    	     &limit=`1`
    	     &total=`1`	     
    	     &context=`web`	     
    	     &sortby=`{"publishedon":"DESC"}`
    	     &tpl=`homepageTopTpl`
    	     &showHidden=`1`
    	     &tvPrefix=``
    	     &offset=`0`
    	     &includeTVList=`games`	  
    	     &cache=`0`	  
    	     &totalVar=`hp-1-total`
    	     &hp-1-total=`1`		   
    	     &debug=`1`
    	 ]]


    The mentioned parents are different "Articles" folders. We use those to manage our different page categories. Perhaps this error is interlinked with articles snippet in a way.

    Anyone has a clue why it outputs a log like this?

     [2012-03-03 18:47:37] (ERROR @ /index.php) context for 15997 is web
    [2012-03-03 18:47:37] (ERROR @ /index.php) context for 16004 is web
    [2012-03-03 18:47:37] (ERROR @ /index.php) context for 16005 is web
    [2012-03-03 18:47:37] (ERROR @ /index.php) context for 16006 is web
    [2012-03-03 18:47:37] (ERROR @ /index.php) context for 16007 is web
    [2012-03-03 18:47:37] (ERROR @ /index.php) context for 16008 is web
    [2012-03-03 18:47:37] (ERROR @ /index.php) context for 16009 is web
    [2012-03-03 18:47:37] (ERROR @ /index.php) context for 16010 is web
    [2012-03-03 18:47:37] (ERROR @ /index.php) SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`articles_container_settings`, `modResource`.`articles_container` FROM `modx_site_content` AS `modResource` WHERE  ( modResource.parent IN (15997,16004,16005,16006,16007,16008,16009,16010) AND (modResource.context_key IN ('web') OR EXISTS(SELECT 1 FROM `modx_context_resource` ctx WHERE ctx.resource = modResource.id AND ctx.context_key IN ('web'))) AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 )  ORDER BY publishedon DESC LIMIT 5, 2 


    Any help would be appreciated.

    PS: Don't bother if the log output does not seem to fit exactly to the snippet call. We have several of them and the only difference is this LIMIT 5,2 which is created with different total and offset filters.
      • 15929
      • 2 Posts
      Greeting, I second that!

      Even tried
      [[!getResources? &debug=`1` ]]
      and i have a similar message.

       [2012-03-14 16:29:52] (ERROR @ /index.php) context for 10 is web
      [2012-03-14 16:29:52] (ERROR @ /index.php) SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree` FROM `modx_site_content` AS `modResource` WHERE  ( modResource.parent IN (10,11,12,13) AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND `modResource`.`hidemenu` = 0 )  ORDER BY publishedon DESC LIMIT 5 


      MODX Revolution 2.2.0-rc3
      GetRessource 1.4.2

      Any clue ? Thanks!
      • It's just an informational log message when you turn debug on in the snippet. It is not an error.
          • 15929
          • 2 Posts
          Oops!

          Another lesson of life!

          Thank you Opengeek!
            • 10525
            • 247 Posts
            Is there any way this informational log message could be altered to say INFO instead of ERROR? (for the sake of the old blood pressure ;-) )