We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20471
    • 40 Posts
    I have a MIGX-TV where editors are able to select/upload one or more PDFs that are to be displayed in the front-end.

    For this I use an inputTV called fileTV, that uses a custom Media Source. This Media Source has basePath and baseUrl set to "files/pdf/".

    Editors are able to select/upload files, but in the front-end the path is wrong (it's wrong in the manager as well, but that really doesn't affect the experience). What should be "mysite.com/files/pdf/mypdf.pdf" is just "mysite.com/mypdf.pdf". If I use the default Media Source (Filesystem) it works. Outside of MIGX this Media Source works just fine, and the correct path is set.

    I have MIGX 2.3.2 and MODx 2.2.4.

    Any ideas? Thanks.
      • 20471
      • 40 Posts
      No clues? Anyone?
        • 4172
        • 5,888 Posts
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 20471
          • 40 Posts
          Hmm, no, not really. Mostly because I don't understand it..

          Shouldn't I be able to just use a fileTV with any Media Source?
            • 4172
            • 5,888 Posts
            are you using the migx-configurator or just the formtabs-field?

            If just the formtabs-field can you give your formtabs-content?
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 20471
              • 40 Posts
              Only the formtabs-field.

              Form Tabs:
              [
              {"formname":"PDF", "formtabs":
               [{"caption":"Lägg till", "fields":[
                {"field":"url","caption":"Fil","inputTV":"fileTV"},
                {"field":"title","caption":"Titel"}
               ]}]
              },
              {"formname":"URL", "formtabs":
               [{"caption":"Lägg till", "fields":[
                {"field":"url","caption":"URL","inputTV":"urlTV"},
                {"field":"title","caption":"Titel"}
               ]}]
              },
              {"formname":"Seminarium", "formtabs":
               [{"caption":"Lägg till", "fields":[
                {"field":"url","caption":"Seminarium","inputTV":"seminarTV"}
               ]}]
              }
              ]


              Grid Columns:
              [
              {"header":"Titel", "width":"150", "sortable":"true", "dataIndex":"title"},
              {"header": "", "width":"150", "sortable":"false", "dataIndex":"url"}
              ]
                • 4172
                • 5,888 Posts
                I found, this is an issue with multiple forms, with same fieldnames, but different mediasources for the same fieldname.

                can you try to use different fieldnames for the url, for example something like that:

                [
                {"formname":"PDF", "formtabs":
                 [{"caption":"Lgg till", "fields":[
                  {"field":"pdfurl","caption":"Fil","inputTV":"fileTV"},
                  {"field":"title","caption":"Titel"}
                 ]}]
                },
                {"formname":"URL", "formtabs":
                 [{"caption":"Lgg till", "fields":[
                  {"field":"url","caption":"URL","inputTV":"urlTV"},
                  {"field":"title","caption":"Titel"}
                 ]}]
                },
                {"formname":"Seminarium", "formtabs":
                 [{"caption":"Lgg till", "fields":[
                  {"field":"seminarurl","caption":"Seminarium","inputTV":"seminarTV"}
                 ]}]
                }
                ]
                
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 20471
                  • 40 Posts
                  That actually works!

                  Only problem is with the Grid Columns. dataIndex there is "url", meaning nothing is shown in the grid if I add PDF or Seminar. Is there a way of having multiple dataIndexes in a column? Something like "dataIndex":"pdfurl,url,seminarurl"? Or any other solution?

                  If not I guess I could just skip that column. Important thing is that it works smiley
                    • 4172
                    • 5,888 Posts
                    think, I found a fix for the multiform-mediasource-issue.

                    will commit it tomorrow to github.
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 20471
                      • 40 Posts
                      Sweet! Thank you so much for all your help, Bruno!