We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49481
    • 32 Posts
    I get a large SQL query appearing when I add &return=`sql`. I have a lot of TVs.
    disabling the &tpl makes no difference. There's no array output. Still a blank page.

    my call is:
    [[!mmlCache?
      &element=`pdoResources`
      &parents=`0`
      &resources=`[[*id]]`
      &tpl=`mainPageTpl`
      &includeContent=`1`
      &includeTVs=`[[mmlGetTemplateTVs]]` 
      &prepareTVs=`1`
      &processTVs=`1`
      &tvPrefix=``
      &loadModels=`migxmultilang`
      &prepareSnippet=`mmlTranslatePdoToolsRow`
    ]]


    I also tried the &context property before like Susan suggested but it didn't change anything.


    EDIT: Ok I've worked out what the problem is after seeing how big the output was from the &return=`sql` property.

    I disassociated about half of my TVs from the template and now it's working.

    So there must be a limit on how many TVs I can use? Is there a way of increasing this limit? [ed. note: reginald last edited this post 9 years, 2 months ago.]
      • 4172
      • 5,888 Posts
      what is a 'lot' of TVs?
      how many?

      You might think about working with custom tables or/and extented Resources instaed of that many TVs.

      Can it be, it is one particular TV, which makes issues?

      What happens without

        &prepareTVs=`1`
        &processTVs=`1`
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 49481
        • 32 Posts
        Hi Bruno,

        I have about 60 TVs in total. It seems to stop working at 56 TVs.
        It doesn't seem to be one TV in particular that's causing the problem as I've swapped them all in and out.

        The reason I have so many is because the page has a rather long form which I want to be available in two languages. So There are about 30 labels I have on the form to be translated. 30 for one language and 30 for the other.

        Removing the &prepareTVs and &processTVs didn't change anything.

        I'm quite new to this. Is 60 considered to be way too much?

        I'll look into how to do custom tables and extended resources if you think that's the way to go.

        Thanks
        • discuss.answer
          • 4172
          • 5,888 Posts
          In this case, I think you could just use the MODX - lexicon to translate the labels

          or create two form-chunks, one for each language with names like

          form_de and form_en

          and call them with

          [[!$myform_[[++cultureKey]]]]


          you really don't need to create template-variables for them.

          A third solution could be, to create your form with MIGX
          Have two fields in the MIGX like

          label_de and label_en

          and let MIGX (getImageList) generate your form and have the translated labels with
          [[!+label_[[++cultureKey]]]]

            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 49481
            • 32 Posts
            Thanks Bruno!

            I wanted to create template variables for them so that content editors could change them at will.
            I'll have a go at generating the fields via MIGX.

            Do you know why it can't process that amount of TVs?

              • 4172
              • 5,888 Posts
              well 60 TVs (30 TVs for each language) means 60 joins for pdoResources.
              Maybe a memory-limit-issue.

              Didn't try it with that many TVs and currently haven't a chance todo so.

              I really think a MIGX-TV to generate the form-labels for different languages is your best option here.
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 49481
                • 32 Posts
                Got it working with MIGX tvs. I'll just tell the editors to only edit the existing ones I've made and not delete or add any. (Unless there's a way to restrict that with permissions?)

                Thanks again Bruno!