We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33688
    • 54 Posts
    I get a parsing error from the NewsListing snippet when I set &startID to a folder that is empty (even though I use &emptytext). The error message looks like this:
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »
     
    PHP error debug
      Error: 	array_values() [function.array-values]: The argument should be an array	 
      Error type/ Nr.: 	Warning - 2	 
      File: 	/home/www.credoakademin.nu/modx/manager/includes/document.parser.class.inc.php(691) : eval()'d code	 
      Line: 	418	 
     
    Parser timing
      MySQL: 	0.0203 s s	(6 Requests)
      PHP: 	0.1017 s s	 
      Total: 	0.1220 s s

    Here’s the snippet call that produces the parsing error:
    [[NewsListing? &tpl=`NewsListingTemplate`&startID=`43` &emptytext=`Hittade inga artiklar`  &paginate=`1`  &alwaysshow=`1` &truncText=`Läs mer...` ]]

    This error message shows only when $multilevel=1. When $multilevel=0 the &emptytext doubles (shows twice) but there’s no parsing error. This must a bug, mustn’t it?

    Mats
      • 2762
      • 1,198 Posts
      Nicola (Banzai) Reply #2, 18 years ago
      Quote from: Mats at Apr 24, 2006, 08:33 AM

      ......
      This error message shows only when $multilevel=1. When $multilevel=0 the &emptytext doubles (shows twice) but there’s no parsing error. This must a bug, mustn’t it?

      Mats

      ..do you have any other newslisting call in folder id 43 (or subfolders)?
        Free MODx Graphic resources and Templates www.tattoocms.it
        -----------------------------------------------------

        MODx IT  www.modx.it
        -----------------------------------------------------

        bubuna.com - Web & Multimedia Design
        • 33688
        • 54 Posts
        Quote from: banzai at Apr 24, 2006, 09:38 AM

        ..do you have any other newslisting call in folder id 43 (or subfolders)?
        No, this is the only snippet call in folder id 43 (and there are no subfolders). In fact, this is the only content there is on the page (which is actually a folder).
          • 2762
          • 1,198 Posts
          Nicola (Banzai) Reply #4, 18 years ago
          what release number of newslisting you’re using?
            Free MODx Graphic resources and Templates www.tattoocms.it
            -----------------------------------------------------

            MODx IT  www.modx.it
            -----------------------------------------------------

            bubuna.com - Web & Multimedia Design
            • 33688
            • 54 Posts
            Quote from: banzai at Apr 24, 2006, 11:00 AM

            what release number of newslisting you’re using?
            It’s 6.3.3
              • 2762
              • 1,198 Posts
              Nicola (Banzai) Reply #6, 18 years ago
              try calling without emptytext and alwaysshow :
              [[NewsListing? &tpl=`NewsListingTemplate`&startID=`43` &paginate=`1` &truncText=`Läs mer...` ]]

                Free MODx Graphic resources and Templates www.tattoocms.it
                -----------------------------------------------------

                MODx IT  www.modx.it
                -----------------------------------------------------

                bubuna.com - Web & Multimedia Design
                • 33688
                • 54 Posts
                Quote from: banzai at Apr 24, 2006, 01:33 PM

                try calling without emptytext and alwaysshow :
                [[NewsListing? &tpl=`NewsListingTemplate`&startID=`43` &paginate=`1` &truncText=`Läs mer...` ]]

                Doesn’t help. No change.
                  • 6726
                  • 7,075 Posts
                  A way to help you identify and solve the problem is to add this parameter to your NewsListing call :

                  &debug=`1`

                  The error message should help us understand what went wrong...
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l'outil id
                    • 33688
                    • 54 Posts
                    Quote from: davidm at Apr 24, 2006, 02:13 PM

                    A way to help you identify and solve the problem is to add this parameter to your NewsListing call :

                    &debug=`1`

                    The error message should help us understand what went wrong...
                    Right, debug now added. But the output to the screen is no different from the PHP error debug in my first post in this thread (see here). But maybe a deeper background debug output goes somewhere else?

                    Mats
                      • 6726
                      • 7,075 Posts
                      OK, let’s go one step further then :
                      Turning on debug mode for MODx

                      As you will see, you have a parameter in index.php
                      $modx->stopOnNotice = false;
                      which can be turned to
                      $modx->stopOnNotice = true;

                      Maybe that will help...

                      Edit : I noticed a little thing in your snippet call : there is a space missing before startID=`43` tongue
                      Doesn’t change the multilevel thing but...

                        .: COO - Commerce Guys - Community Driven Innovation :.


                        MODx est l'outil id