We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25483
    • 741 Posts
    I am started with the project I talked about and the multi lingual aliases are working perfect, but I think I found a small bug! I activated the "Use MODx stripAlias" function, but my aliases still have capitals instead of that to be changed to lowercase.

    So if the title is "Welcome" the alias will also be "Welcome" while it has to be "welcome".
      with regards,

      Ronald Lokers
      'Front-end developer' @ h2o Media

      • 17883
      • 1,039 Posts
      Quote from: PMS at Oct 08, 2009, 09:27 AM

      Please can you clarify exactly what under what circumstances you expect which field to get copied where? Is this to do with the standard/document pagetitle being auto-updated with the default language pagetitle when a document is saved?

      yes.
      Quote from: PMS at Oct 08, 2009, 09:27 AM

      Modules > YAMS > Other Params > Document Layout Settings > Autoupdate Manager Document Title

      set to Yes? Perhaps you switched it off if you were using your own rules.

      Yes, this is set. You can take a look, it is the same site as always ;-)

      Problem was, I had to rebuild the config file because I accidently overwrote it. But everything else seems to work, so it is a bit weird. I put the the mm rules in the chunk "mm_rules" where only the yams-rules are included.
        • 22851
        • 805 Posts
        Quote from: MediaGuy at Oct 08, 2009, 01:02 PM

        I am started with the project I talked about and the multi lingual aliases are working perfect, but I think I found a small bug! I activated the "Use MODx stripAlias" function, but my aliases still have capitals instead of that to be changed to lowercase.

        So if the title is "Welcome" the alias will also be "Welcome" while it has to be "welcome".
        I’m pretty sure that this isn’t a bug in YAMS. If you disable the YAMS and ManagerManager plugins and try entering capital letters into the standard document alias field and save, you’ll see that the capitals remain, suggesting that this is standard MODx behaviour.

        If YAMS auto-generates an alias it will strip all PHP/XML/HTML from it for security. However, apart from that YAMS itself wont manipulate aliases in any way. By default it will run the OnStripAlias event on them however, since that’s what MODx does - but you can turn off that functionality if you want to.

        With MODx Evo the TransAlias plugin is active on the OnStripAlias event by default - and while this will do transliteration of your aliases so that you end up with latin character based aliases - it doesn’t look like it converts them to lower case. The simplest way then of getting lower case aliases is to edit the TransAlias plugin and change the line:
                    $output = $trans->stripAlias($alias);

        to
                    $output = strtolower( $trans->stripAlias($alias) );

        I’ve just tested that and it works.
          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
          @MadeMyDay

          I had a quick look. Turns out your YAMS plugin system events were not set correctly. Fixed now, so it should work as expected.
            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.
            • 36624
            • 535 Posts
            Quote from: MadeMyDay at Oct 08, 2009, 03:06 PM

            Quote from: PMS at Oct 08, 2009, 09:27 AM

            Please can you clarify exactly what under what circumstances you expect which field to get copied where? Is this to do with the standard/document pagetitle being auto-updated with the default language pagetitle when a document is saved?

            yes.
            Quote from: PMS at Oct 08, 2009, 09:27 AM

            Modules > YAMS > Other Params > Document Layout Settings > Autoupdate Manager Document Title

            set to Yes? Perhaps you switched it off if you were using your own rules.


            i use 1.1.7 alpha RC2 and i see the same thing when saving a new doc.

            but if i re-edit my doc and i delete the "internal name" field and resave, then the default language field is copied.

            maybe it’s the plugin events ? i set these (documentation was unclear to me with last versions):
            OnLoadWebDocument
            OnParseDocument
            OnWebPageComplete
            OnWebPagePrerender
            OnLoadWebPageCache
            OnPageNotFound
            OnBeforeDocFormSave

            edit: oh i see you just answer while i was writing.. can you tell me the events needed ?
              CTRL+SHIFT+U - Clear Cache
              CTRL+SHIFT+H - Hiding Heft Panel
              CTRL+SHIFT+N - Fast Create Resource
              CTRL+ALT+P - Preview Recource (in edit resorce window)
              CTRL+ALT+S - Save
              • 22851
              • 805 Posts
              Quote from: manu at Oct 08, 2009, 04:19 PM

              maybe it’s the plugin events ? i set these (documentation was unclear to me with last versions):
              OnLoadWebDocument
              OnParseDocument
              OnWebPageComplete
              OnWebPagePrerender
              OnLoadWebPageCache
              OnPageNotFound
              OnBeforeDocFormSave

              edit: oh i see you just answer while i was writing.. can you tell me the events needed ?
              The events have changed from version to version. The best place to look is point 3 of the installation instructions in the readme.txt, or alternatively the case statements in the code in yams.plugin.inc.php. For version 1.1.7 alpha RC2 the readme.txt says:
              - OnLoadWebDocument
              - OnParseDocument
              - OnWebPageInit
              - OnWebPagePrerender
              - OnLoadWebPageCache
              - OnPageNotFound
              - OnBeforeDocFormSave
              

              so OnWebPageComplete is not required and you are missing OnWebPageInit. That isn’t the the source of your problems however. Looking at the history of changes I can see
              Version 1.1.7 alpha RC5
              - Bug fix: Fixed a bug whereby on first save of a newly created multilingual
                document, pagetitles and aliases would not get updated.
              

              so it is a bug that has been fixed in a more recent version. I’d recommend updating right up to the latest version.
                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.
                • 33241
                • 9 Posts
                Quote from: ysera at Oct 08, 2009, 08:21 AM

                Quote from: PMS at Oct 08, 2009, 08:09 AM

                Please update your .htaccess and then try accessing http://192.168.0.8/index.php?id=1 again.

                Done, but unfortunately nothing has changed. embarrassed
                As i was reading the forum, found that modified htaccess part of friendly URL-s, but gonna use this one from now. I will try to set up this entirely solution besides of my localhost, maybe with more luck smiley

                Thank you for the quick answers, made me get closer to my goal! smiley

                I’ve tried it today with my ISP (ysera.wplanet.hu), and it is the same. sad

                After setting up Modx+Yams and mangagermanager and switching one template to a multi lingual one, and using Language dependent root names, i can’t reach my documents any more. It wants to reach http://ysera.wplanet.hu/en/index.php?id=1 and i can avoid the 404 Not Found response in only one way: creating an /en folder and an index.php file on it. But it is pathetic, i should be able to reach any of my sites without saving them to an exact location. I feel myself like an idiot. huh
                  • 22851
                  • 805 Posts
                  Quote from: ysera at Oct 09, 2009, 04:59 AM

                  Quote from: ysera at Oct 08, 2009, 08:21 AM

                  Quote from: PMS at Oct 08, 2009, 08:09 AM

                  Please update your .htaccess and then try accessing http://192.168.0.8/index.php?id=1 again.

                  Done, but unfortunately nothing has changed. embarrassed
                  As i was reading the forum, found that modified htaccess part of friendly URL-s, but gonna use this one from now. I will try to set up this entirely solution besides of my localhost, maybe with more luck smiley

                  Thank you for the quick answers, made me get closer to my goal! smiley

                  I’ve tried it today with my ISP (ysera.wplanet.hu), and it is the same. sad

                  After setting up Modx+Yams and mangagermanager and switching one template to a multi lingual one, and using Language dependent root names, i can’t reach my documents any more. It wants to reach http://ysera.wplanet.hu/en/index.php?id=1 and i can avoid the 404 Not Found response in only one way: creating an /en folder and an index.php file on it. But it is pathetic, i should be able to reach any of my sites without saving them to an exact location. I feel myself like an idiot. huh
                  Hi @ysera.
                  Do you really want to access your documents via http://yoursite.com/en/index.php?id=... or do you want to access them via document aliases: http://yoursite.com/en/doc.html ? If it’s the former then I think you will have to set Modules > YAMS > Other Params > URL Redirection Settings > MODx URLs to the * character to allow index.php?id=... style URLs to be accepted. If it’s the latter then you will have to switch on friendly URLs: Tools > Configuration > Friendly URLs. I get the feeling you may have them switched off. YAMS works much better with them on.

                  ... but thinking about it further, I’m not confident that either of those things will solve your ’Object not found’ problem. Sounds like the server is saying page not found without even sending the request to MODx - which would suggest a server configuration issue. Perhaps .htaccess has been disabled on your system or something like that. When you go to http://yoursite.com/ what happens? Do you get redirected anywhere?
                    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.
                    • 33241
                    • 9 Posts
                    I’d like to acces them by this way:

                    If i write this int my browser:
                    http://www.galerie-interart.com
                    i’d like to get the default site:
                    http://www.galerie-interart.com/en/home.html
                    and i’d like the possibility to switch a language, when i should see this in my browser:
                    http://www.galerie-interart.com/fr/accueil.html

                    The only thing i’m thinking about is that .htaccess problem. Both of my localhost and ISP i can’t see a .htaccess file, only ht.access, which contains the informations about the ModX, what i’ve already linked before. When i previously installed Drupal, there was a .htaccess instead of ht.access, and when i owerwritten it, i was unable to reach any of my sites due an internal server error. I could resolve this by uploading an empty .htacces file. But regardless of how many times i’ve updated my ht.access file, i still can’t solve my 404 Not found problem.

                    I’ve made a picture about my public_html folder, maybe it helps: http://ysera.wplanet.hu/yams_problem_3.png

                    .. but thinking about it further, I’m not confident that either of those things will solve your ’Object not found’ problem. Sounds like the server is saying page not found without even sending the request to MODx - which would suggest a server configuration issue. Perhaps .htaccess has been disabled on your system or something like that. When you go to http://yoursite.com/ what happens? Do you get redirected anywhere?

                    Without allowing friendly URLs in MODx -> Tools -> Configuration -> Friendly URLs:
                    ysera.wplanet.hu -> http://ysera.wplanet.hu/en/index.php?id=1 => 404
                    With the following options: http://ysera.wplanet.hu/yams_problem_4.png
                    ysera.wplanet.hu -> http://ysera.wplanet.hu/en/index.html => 404
                    (index is my resource alias from the resource edit page and html the prefix from tools->configuration)

                    It seems it wants to reach that /en folder, and i’ve no idea why.

                    Thank you in advance!
                      • 33241
                      • 9 Posts
                      All right. I’m an OX!

                      I’ve created a .htaccess file (instead of ht.access) copied into my root folder of the localhost, and...
                      Working as intended!!!

                      I’m happy! grin

                      Thank you for your time PMS!