We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22851
    • 805 Posts
    @Fil DOrc

    Glad you got it working.

    @FuryDE

    Do you use PHx on your site? If you do then please note that:

    1. YAMS must appear first in the plugin execution order and PHx should appear after.
    2. Although some people are using PHx with YAMS successfully, it is known that not all PHx will work with YAMS. Some PHx can manipulate document contents in such a way that breaks YAMS constructs that are hidden in the document during parsing. In general I don’t recommend heavy usage of PHx.
    3. The PHx snippet needs to be modified to wrap the include statement in some code that will only include the file if the class has not yet been defined:
    if ( ! class_exists( 'PHxParser' ) )
    {
     include_once $modx->config['rb_base_dir'] . "plugins/phx/phx.parser.class.inc.php";
    }
    


    I thought I should mention it in case one of those is the cause of your blank pages.
      YAMS: Yet Another Multilingual Solution for MODx
      YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
      Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
      • 22851
      • 805 Posts
      @FuryDE. Another question. What version of PHP do you have installed? Cheers.
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
        • 10313
        • 375 Posts
        Sorry for taking so much time, I had some other troubles on different websites. My first try with YAMS is running on PHP 5.2.6-1+lenny2. My current second try is running with 5.2.11. But there I’m currently stuck with a 500 error because of my .htaccess file. Grml.

        EDIT: My second try on a different server works VERY FINE smiley I’m just at the beginning, but I already get output AND different content on my /en/start.htm resp. /de/start.htm.

        Thank you!
          • 22851
          • 805 Posts
          Brilliant. Glad you got it working. If you ever figure out what server setting is causing the blank pages on some servers I’d be grateful if you could share it. It could prove to be useful info for someone else.
            YAMS: Yet Another Multilingual Solution for MODx
            YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
            Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
            • 10313
            • 375 Posts
            Im currently back in my troubles with that server and the empty pages. It still is not working. I have compared all my YAMS-settings with those of the "running" server. But it’s all the same.

            It must be the YAMS plugin. When I change the plugin code to require a non-existent file, I get a MODx error message (wich apparently is correct). But thus I can see the plugin is being started. However, it does not produce any output.

            Martin
              • 22851
              • 805 Posts
              That’s really frustrating.

              One thing that the YAMS class does when it is initialised is to set the pcre.backtrack_limit php ini setting to a value large enough to ensure that the preg searches will scan the whole document. If they don’t then YAMS parsing can fail.

              Perhaps on the server where you are getting the blank pages programmatic setting of php ini values has been disabled and so pcre.backtrack_limit not being set. If so, that could be causing the problem and you might be able to solve it by asking the hosts to increase the value manually for you.

              To test whether that is the problem, place find the Initialise method in the assets/modules/yams/class/yams.class.inc.php file, and replace the line
                    ini_set('pcre.backtrack_limit', '16000000');
              

              by
                    $success = ini_set('pcre.backtrack_limit', '16000000');
                    if ( $success === FALSE )
                    {
                      $modx->logEvent(29, 2, 'Could not set php ini prce.backtrack_limit value to 16000000.' , 'YAMS::Initialise']);
                    }
              


              Then view a document and check your MODx system event log.
                YAMS: Yet Another Multilingual Solution for MODx
                YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
                • 10313
                • 375 Posts
                Hi!

                Thank you for your unresting help. I just tried the code, but still there is no output sad

                Martin
                  • 22851
                  • 805 Posts
                  Just to confirm: When you say that there is still no output, do you mean that you still get blank pages, or do you mean that you don’t get any messages appearing the system event log?
                    YAMS: Yet Another Multilingual Solution for MODx
                    YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                    Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
                    • 10313
                    • 375 Posts
                    I get empty pages with no output AND there is no message in the MODx system log.
                      • 22851
                      • 805 Posts
                      Oops! There was an extra closing square bracket floating around in the code I gave you to try. This would cause blank pages. Please can you try this instead:
                            $success = ini_set('pcre.backtrack_limit', '16000000');
                            if ( $success === FALSE )
                            {
                              $modx->logEvent(29, 2, 'Could not set php ini prce.backtrack_limit value to 16000000.' , 'YAMS::Initialise');
                            }
                      

                      and then load a page and check your system event log. Sorry about that!
                        YAMS: Yet Another Multilingual Solution for MODx
                        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.