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

    In the mode that you are using, browsing directly to http://mysite.com/index.php?id=### will likely display the wrong page (the site start page). YAMS thinks that index.php is the alias of a real document on your site and tries to redirect according to your YAMS redirection settings. Sticking &z=manprev on the end of the query will avoid this redirection and should allow you to view the correct page.

    Clicking on the main preview button in the manager sends you to http://mysite.com/ - which depending on how you have set up your YAMS redirection and whether or not your site start page is multilingual will probably automatically be redirected to http://mysite.com/it/, so that should work.

    When viewing the preview pane of a document, MODx uses an index.php?id=###&z=manprev style URL, so that should work too. (It does on my test site.)

    So, I’m confused as to why you are getting blank pages. Please could you answer another few questions?

    • Which one or all of these scenarios, or indeed other scenario, is resulting in a blank page for you?
    • What version of MODx are you using?
    • Did you check your error logs (server and MODx) for any evidence of YAMS related errors?
    • Are you using ditto?

    Sorry I’ve only got more questions, rather than a solution at this stage. It would be good to get to the bottom of this.

    Thanks.
      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
      This is a reply to burn’s questions on the YAMS - am i the only one...? thread.

      Firstly, burn, I think that you might not be using the latest version. I made quite a few documentation updates in the latest version. Please grab version 1.0.3-alpha from YAMS’ page in the MODx repository.

      Quote from: burn at Jul 23, 2009, 12:46 PM


      - OnDocFormSave (Only required if you have selected the option to synchronise
      the main document pagetitle with the default language pagetitle for
      mulitlingual documents)
      what does red mean?

      I agree that this is confusing. The text should read:
      Only required if you would like to selected the option to synchronise the main document pagetitle with the default language pagetitle for mulitlingual documents
      For documents which are associated with a multilingual template, there is one page title for each language as well as the original document page title. The original document page title is redundant - since it doesn’t appear on the web page output. However, it is used by MODx to label the document in the document tree. The option referred will automatically update the document pagetitle with the contents of the default language pagetitle when it is saved.

      In future I will remove the advice in red text and instead suggest that YAMS is always associated with the OnDocFormSave event. If the synchronisation option is not selected, YAMS will just do nothing.

      Quote from: burn at Jul 24, 2009, 06:57 AM

      how and where would i have to set this (= Server Name mode and/or Root Name) up?

      The modes (server name, root name and query param) are not set directly by you. Rather, you decide how you want to configure YAMS and YAMS decides what modes are active dependent on how you set it up. You configure these settings on the "Language Settings" tab of the YAMS module. So, if you specify a different server name for each language, YAMS will determine that server name mode is active. If you specify a different root name for each language, YAMS will determine that root name mode is active. If you don’t set any server or root names, YAMS will put you in query param mode.

      Quote from: burn at Jul 25, 2009, 05:32 AM

      step 3 (Configure Language Settings) also seems to be fine, i want to have english as default and german as 2nd language, no monolingual pages, i edited yams.config.inc.php and changed it accordingly, see:


      Just a note that you shouldn’t have to edit yams.config.inc.php. YAMS should be (almost) completely configurable via the module interface and I advise that you use this approach to be sure that you don’t introduce any inconsistencies in the config file. Let me know if you have any problems with the module interface. Anyway, your screenshot looks fine apart from the fact that German is currently set as your default, not English.

      Your set-up looks very similar to the one I use as my main example site, so I am hopeful that we should be able to get this to work. One difference appears to be that you are using friendly alias paths, but I am not. I am not sure if anyone has tested it with friendly alias paths switched on before, so you might be the first and so you might encounter some gremlins!

      Quote from: burn at Jul 25, 2009, 05:32 AM

      but now i’m really stuck... as i don’t know how to implement step 5 (Update URLs) the frontend gives me a 404 since it consequently doesn’t find e.g http://localhost/de/modx/features.html -- what gives, any ideas?

      Please can you confirm something for me? Do you get a 404 not found if you browse directly to http://localhost/de/modx/features.html, which I presume is the correct multilingual URL, or do you get it if you follow a link from another page? Please can you try without friendly alias paths to see if that makes a difference?

      Quote from: burn at Jul 25, 2009, 05:32 AM

      this is what i’d like to see soon:
      http://img10.imageshack.us/img10/473/yamsmultilingualdocumen.png

      For that you’ll need to
      1) install ManagerManager,
      2) make sure that you have
      $config_chunk = 'mm_rules';

      specified in your ManagerManager plugin, and
      3) finally you need to make sure you have a chunk called mm_rules with the following code in it:
      require( $modx->config['base_path'] . 'assets/modules/yams/yams.mm_rules.inc.php' );
      


      This will give you the nice tabbed layout you are after when you edit your multilingual documents.

      Quote from: burn at Jul 25, 2009, 05:32 AM

      BTW, in my YAMS - Module - System Events it shows an error: "Undefined variable: isAltRow", googled for it, no info on that.
      it’s not a showstopper, is it?!

      I thought this was bug was squashed by me a while ago. That’s what makes me think that you are using an older version. Please let me know if you still get this message when using the latest version. By the way, yes - it should be harmless.
        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
        Quote from: burn at Jul 23, 2009, 12:46 PM

        i’m good at translating, i could do the german part, well, that’s what i can offer.
        Sounds great. I am currently working on reorganising the module interface to make it easier to maintain and also to translate using a language file. I have also had a couple of other requests for translated documentation so I have bumped it up to the top of my priority list.
          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.
          • 4330
          • 6 Posts
          Firstly, burn, I think that you might not be using the latest version. I made quite a few documentation updates in the latest version. Please grab version 1.0.3-alpha from YAMS’ page in the MODx repository.
          yep, did that, no "Undefined variable: isAltRow" anymore...

          Only required if you would like to selected the option to synchronise the main document pagetitle with the default language pagetitle for mulitlingual documents
          resolved, too.

          The modes (server name, root name and query param) are not set directly by you. Rather, you decide how you want to configure YAMS and YAMS decides what modes are active dependent on how you set it up. You configure these settings on the "Language Settings" tab of the YAMS module. So, if you specify a different server name for each language, YAMS will determine that server name mode is active. If you specify a different root name for each language, YAMS will determine that root name mode is active. If you don’t set any server or root names, YAMS will put you in query param mode.
          thanks for the explanation, i hope i got that right (in my head).

          Just a note that you shouldn’t have to edit yams.config.inc.php. YAMS should be (almost) completely configurable via the module interface and I advise that you use this approach to be sure that you don’t introduce any inconsistencies in the config file. Let me know if you have any problems with the module interface. Anyway, your screenshot looks fine apart from the fact that German is currently set as your default, not English.
          it woudn’t let me delete ’ja’ and change ’fr’ to ’de’ but that could have been me or opera or both, i’m sure it was tested.. undecided

          Your set-up looks very similar to the one I use as my main example site, so I am hopeful that we should be able to get this to work. One difference appears to be that you are using friendly alias paths, but I am not. I am not sure if anyone has tested it with friendly alias paths switched on before, so you might be the first and so you might encounter some gremlins!
          no, i wasn’t using "friendly alias paths", i am using friendly urls and aliases only.

          Please can you confirm something for me? Do you get a 404 not found if you browse directly to http://localhost/de/modx/features.html, which I presume is the correct multilingual URL, or do you get it if you follow a link from another page? Please can you try without friendly alias paths to see if that makes a difference?
          always 404, no matter what i do, i’m really puzzled myself... (http://localhost/en/modx/)

          For that you’ll need to
          1) install ManagerManager,
          2) make sure that you have
          $config_chunk = 'mm_rules';

          specified in your ManagerManager plugin, and
          3) finally you need to make sure you have a chunk called mm_rules with the following code in it:
          require( $modx->config['base_path'] . 'assets/modules/yams/yams.mm_rules.inc.php' );

          This will give you the nice tabbed layout you are after when you edit your multilingual documents.
          i had MM already installed, only missed the mm_rules in the config_chunk part --> $config_chunk = ’’;
          now, that’s working fine smiley if only...

          sorry that i can’t provide further details/ideas as to what i’m still missing, to be honest, i got no clue.
          help will be greatly appreciated, thank you very much so far, and yes, put me on your "translaters list" smiley

          regards, burn
            • 22851
            • 805 Posts
            Yes! You’re almost there. Before I tell you the solution, let me respond to one of your comments...

            Quote from: burn at Jul 26, 2009, 03:14 PM

            Just a note that you shouldn’t have to edit yams.config.inc.php. YAMS should be (almost) completely configurable via the module interface and I advise that you use this approach to be sure that you don’t introduce any inconsistencies in the config file. Let me know if you have any problems with the module interface. Anyway, your screenshot looks fine apart from the fact that German is currently set as your default, not English.
            it woudn’t let me delete ’ja’ and change ’fr’ to ’de’ but that could have been me or opera or both, i’m sure it was tested.. undecided

            The way the module interface is set up, it wont allow you to delete an active language. You first have to deactivate it (click on deactivate), then delete it, so that might explain one part of the problem. Also, a language group is defined by its language id. You can edit and change all properties of a language group, but not its id. So, you should be able to change the French language group into a German language group, but it would still be referred to internally by YAMS by the id ’fr’. The best way to achieve what you want is to just create a new language group with the id ’de’ for German, and then delete the French language group. If you are still having problems, then it may be that your assets/modules/yams directory is not writeable by your apache user/group, so YAMS hasn’t got permission to update the yams.config.inc.php file and save your changes. (It does mention this in the installation instructions.) If that is the problem, but you don’t how to make your yams module directory writeable by your server (but not everyone) then tell me whether you are using Windows or Linux (and which flavour) and I’ll try to help.

            Now to fix your 404 problem. If you look back one a page or two you will notice that bjan had the same problem as you. The latest official version of YAMS wont work when you have installed MODx into a subdirectory on your server. To overcome this you can 1) physically move your MODx directory to the root of your public web folder (htdocs), or 2) change your server settings so that your MODx install appears as if it is the root folder (using a virtual host for example), or 3) download and install an even newer un-official version of YAMS as described in a previous post. If you do 3) then you will have to go to the ’Other Params’ tab and set the ’MODx Subdirectory’ to ’modx’ (without quotes) to configure YAMS.

            Let me know which option you chose and how you got on.

            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.
              • 3465
              • 19 Posts
              I try to test the 1.0.4 version. Everything fine and done till the point of trying to add another language.
              I typed de-de-(mysite.com)-de-german-Sprache-Englisch-Französisch and all I get is "Could not add language with lang id "de"".

              ?? Helpless...
                • 22851
                • 805 Posts
                For the server name, please could you tell me if you actually typed (mysite.com) - brackets included - or if you intended this notation to mean that you left the field blank? If you did type (mysite.com), try leaving the field blank instead. Thank you.
                  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.
                  • 3465
                  • 19 Posts
                  Leaving server blank worked. Even though it said first modx parse error.
                  Thank you.
                    • 22851
                    • 805 Posts
                    MODx parse error... Now that’s not good. I certainly didn’t get that when I tested adding a new language. Please could you go to Reports->System Events, find the YAMS parse related error, and paste the details of the error message here? That will hopefully give me a clue as to what the problem was so that I can fix it.

                    Thank you.
                      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.
                      • 3465
                      • 19 Posts
                      This is the parse error text:

                      MODx encountered the following error while attempting to parse the requested resource:
                      « Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’) AND deleted=0’ at line 1 »
                      SQL: SELECT id,pagetitle FROM `bjandres_modx`.`modx_site_content` WHERE template IN () AND deleted=0


                      Hope, it clues you.