We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36604
    • 268 Posts
    hmm. that's sounds nice .. I'll give it a try asap.

    Thank you


    I'll write you what it gave here.

      • 36604
      • 268 Posts
      Sorry.

      Blank return

      [ed. note: elz064 last edited this post 5 years, 10 months ago.]
        • 36604
        • 268 Posts
        I tried to use the GetResourceField snippet instead, that does pretty the same as you GetTvvalue.

        Same issue, it comes from BAbel call
          • 3749
          • 24,544 Posts
          OK,

          Just put this on a page that has a translated version and view it with different values for &resourceId:


          <p>Babel gives this ID: [[!BabelTranslation? &contextKey=`[[*context_key]]` &resourceId=`27`]]</p>


          and see if it gives you the correct resource ID (or anything at all).

          Just a thought. The context_key your sending is the one for the current resource. Is that what Babel wants?

          By the way, getResourceField snippet does not call the babel snippet directly. My code above calls the babel snippet with runSnippet() because that will usually avoid any problems caused by caching, nesting, and parsing order.

            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 36604
            • 268 Posts
            Thank you

            Quote from: BobRay at Jun 12, 2018, 09:47 PM
            OK,

            Just put this on a page that has a translated version and view it with different values for &resourceId:
            <p>Babel gives this ID: [[!BabelTranslation? &contextKey=`[[*context_key]]` &resourceId=`27`]]</p>

            and see if it gives you the correct resource ID (or anything at all).

            This syntax is what is used since the site is online (2013)

            Whatever I used,
            Either your try with this:
             [[getTVValue? &docId=`[[BabelTranslation? &contextKey=`[[*context_key]]` &resourceId=`27`]]` &tv=`footCol2`]]
            	 


            Or this, that was the original code:
             
            	  [[[[BabelTranslation? &contextKey=`[[*context_key]]` &resourceId=`27`]].tv.footCol2]]


            Everything is correctly 'Babelized' (here and at every part of the site).

            Quote from: BobRay at Jun 12, 2018, 09:47 PM

            Just a thought. The context_key your sending is the one for the current resource. Is that what Babel wants?

            Absolutely. Keep in mind this log issue came with Revo upgrades.

            Quote from: BobRay at Jun 12, 2018, 09:47 PM

            By the way, getResourceField snippet does not call the babel snippet directly. My code above calls the babel snippet with runSnippet() because that will usually avoid any problems caused by caching, nesting, and parsing order.
            hmmm not sure to understand this...
              • 3749
              • 24,544 Posts
              If I'm understanding you, everything is working fine except for the annoyance of the error log entries? Is that correct?
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 36604
                • 268 Posts
                Absolutely

                Quote from: BobRay at Jun 13, 2018, 09:21 PM
                If I'm understanding you, everything is working fine except for the annoyance of the error log entries? Is that correct?
                  • 3749
                  • 24,544 Posts
                  The uncached/cached error message says not to do this:


                  [[If? &subject=`[[+modx.user.id]]` &operator=`EQ` &operand=`0` &then=`[[$call_Login]]`    &else=`[[!$qui-est-la]]` ]]



                  The exclamation point on the inner chunk tag will delay the processing of that tag, so the intended content won't be available when the If snippet runs. What the If snippet gets as an argument will likely be the tag itself which can blow up during error processing.

                  So, three options to stop that error:

                  1) No exclamation points -- should be fine unless the chunk is often being altered dynamically in code.
                  [[If? &subject=`[[+modx.user.id]]` &operator=`EQ` &operand=`0` &then=`[[$call_Login]]`    &else=`[[$qui-est-la]]` ]]


                  2) One Exclamation point -- Results will be up-to-date if chunk is up-to-date.
                  [[!If? &subject=`[[+modx.user.id]]` &operator=`EQ` &operand=`0` &then=`[[$call_Login]]`    &else=`[[$qui-est-la]]` ]]


                  2) Two exclamation points -- slows page loads but could be necessary on rare occasions:
                  [[!If? &subject=`[[+modx.user.id]]` &operator=`EQ` &operand=`0` &then=`[[$call_Login]]`    &else=`[[!$qui-est-la]]` ]]



                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting