We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10208 ☆ A M B ☆
    • 1,780 Posts
    Now I know why MIGX isn't working. Image TV's don't work.

    I've either got no image output at all with container elements, or from a simple image TV called in the template I get just the image name. No path, just name with extension.

    I've reinstalled MIGX, and also ran the reinstall from the Cloud dashboard.

    This is a dev Cloud. Quite honestly, it's not something I'd think wouldn't work ever, especially in a Cloud install. I'm stumped, where do I begin with this one?

    This question has been answered by frogabog. See the first response.

    [ed. note: frogabog last edited this post 13 years, 9 months ago.]
      Frogabog- MODX Websites in Portland Oregon
      "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
      Having server issues? These guys have MODX Hosting perfected - SkyToaster
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      Changing the output of the image TV's to image has produced nothing except that image name from the simple TV call in the template is now gone. (from output. I can see the img in the source, which looks fine except there's no path)

        <img src="jessica.jpg" alt="" />

      The image is actually in assets/images.

      ??? Help? [ed. note: frogabog last edited this post 13 years, 9 months ago.]
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        The image TV to use in MIGx shouldn't have a template assignment. Any media sources should be applied to the image TV.

        Are you using the getImageList snippet?
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 10208 ☆ A M B ☆
          • 1,780 Posts
          The image TV's for use with MIGX are not assigned to any template. The simple image TV is however assigned, and this is where I get either just the image name (TV output=default) or nothing (TV output=image).

          I'm using both the default samples from MIGX, and the Flexibility MIGX (just the image TV name is changed here, the rest is the same as the samples).

          I'm thinking it's not a MIGX issue (yes, using getImageList in MIGX) but since I can't get any output from MIGX I can't be 100% sure. Attempting the simple TV image call from the template was my way of ruling out MIGX as the culprit.
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 10208 ☆ A M B ☆
            • 1,780 Posts
            Please take a look at the errors and stack trace I posted here.

            I don't know if it's related, but maybe someone else knows.

            What good is MODX without image TV's? heh... I can't really move forward without them.
              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster
              • 10208 ☆ A M B ☆
              • 1,780 Posts
              I just realized the other thread title isn't relevant even if it contains the code to run the stack trace. I need to solve this TV issue, which has nothing to do with upgrading getResources (since I didn't do that).

              I also forgot to mention, there are phpThumb errors prior (see end of this post). And insofar as the error generated by the getImageList call...

              I'd removed that call entirely from the template. So, there actually is no getImageList snippet, or shouldn't be.

              This generates after clearing the cache and reloading id 1 (that has no MIGX call at all).

              Quote from: frogabog at Jan 01, 2013, 02:57 AM
              Right, so I ran this in mod.class.php and the result at first, was this:

              [2013-01-01 01:49:55] (ERROR @ /index.php) `0` is not a valid integer and may not be passed to makeUrl()
              [2013-01-01 01:49:55] (ERROR @ /index.php) #0 /paas/c0440/www/core/components/discuss/model/discuss/discuss.class.php(169): modX->makeUrl('0')
              #1 /paas/c0440/www/core/cache/includes/elements/modsnippet/50.include.cache.php(40): Discuss->initialize('web')
              #2 /paas/c0440/www/core/model/modx/modscript.class.php(66): elements_modsnippet_50(Array)
              #3 /paas/c0440/www/core/model/modx/modparser.class.php(484): modScript->process(NULL)
              #4 /paas/c0440/www/core/model/modx/modparser.class.php(221): modParser->processTag(Array, true)
              #5 /paas/c0440/www/core/model/modx/modresponse.class.php(83): modParser->processElementTags('', '[[!Discuss]]', true, false, '[[', ']]', Array, 10)
              #6 /paas/c0440/www/core/model/modx/modrequest.class.php(144): modResponse->outputContent(Array)
              #7 /paas/c0440/www/core/model/modx/modrequest.class.php(128): modRequest->prepareResponse()
              #8 /paas/c0440/www/core/model/modx/modx.class.php(1312): modRequest->handleRequest()
              #9 /paas/c0440/www/index.php(72): modX->handleRequest()
              #10 {main}


              There is no snippet or plugin with an ID of 50 although the Discuss snippets started at id 48 through 58 (or something like that). ID's 50 and 51 were not existent.

              So, since loading up Discuss was just on a whim while developing a template at Cloud, I reinstalled Discuss, and then since it didn't give me any new snippets, I uninstalled it.

              makeURL error remains, and the stack trace shows this now:

              [2013-01-01 02:07:52] (ERROR @ /index.php) `id` is not a valid integer and may not be passed to makeUrl()
              [2013-01-01 02:07:52] (ERROR @ /index.php) #0 /paas/c0440/www/core/model/modx/modparser.class.php(1271): modX->makeUrl('id', '', '', '-1', Array)
              #1 /paas/c0440/www/core/model/modx/modparser.class.php(447): modLinkTag->process(NULL)
              #2 /paas/c0440/www/core/model/modx/modparser.class.php(221): modParser->processTag(Array, false)
              #3 /paas/c0440/www/core/model/modx/modparser.class.php(399): modParser->processElementTags('[[!getImageList...', '!getImageList? ...', false)
              #4 /paas/c0440/www/core/model/modx/modparser.class.php(221): modParser->processTag(Array, false)
              #5 /paas/c0440/www/core/model/modx/modchunk.class.php(118): modParser->processElementTags('[[$soBoxyBasicP...', ' [/quote]
              [quote]
              prior errors:
              [2012-12-31 14:28:57] (ERROR in xPDOConnection::connect @ /paas/c0440/www/core/xpdo/xpdo.class.php : 2999) SQLSTATE[08004] [1040] Too many connections
              [2012-12-31 14:28:57] (ERROR @ /manager/index.php) Error preparing statement for query: SELECT `modSnippet`.`id` AS `modSnippet_id`, `modSnippet`.`source` AS `modSnippet_source`, `modSnippet`.`property_preprocess` AS `modSnippet_property_preprocess`, `modSnippet`.`name` AS `modSnippet_name`, `modSnippet`.`description` AS `modSnippet_description`, `modSnippet`.`editor_type` AS `modSnippet_editor_type`, `modSnippet`.`category` AS `modSnippet_category`, `modSnippet`.`cache_type` AS `modSnippet_cache_type`, `modSnippet`.`snippet` AS `modSnippet_snippet`, `modSnippet`.`locked` AS `modSnippet_locked`, `modSnippet`.`properties` AS `modSnippet_properties`, `modSnippet`.`moduleguid` AS `modSnippet_moduleguid`, `modSnippet`.`static` AS `modSnippet_static`, `modSnippet`.`static_file` AS `modSnippet_static_file` FROM `modx_site_snippets` AS `modSnippet` WHERE `modSnippet`.`name` = ? -
              [2012-12-31 14:31:21] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /paas/c0440/www/core/cache/phpthumb/phpThumb_cache_eh.frogabogcloud.modxcloud.com_srcd3e3ec3d062325917fb971c446e2c899_paradf896d45f319fa323d889e84ccb98c5_dat0.jpeg
              [2012-12-31 14:31:21] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
              OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 557
              [2012-12-31 14:31:22] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /paas/c0440/www/core/cache/phpthumb/phpThumb_cache_eh.frogabogcloud.modxcloud.com_srcd3e3ec3d062325917fb971c446e2c899_paradf896d45f319fa323d889e84ccb98c5_dat0.jpeg
              [2012-12-31 14:31:22] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
              OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 557
              [/quote]
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 10208 ☆ A M B ☆
                • 1,780 Posts
                tried to paste this in various ways into the above post, but it never came through.


                prior errors:
                [2012-12-31 14:28:57] (ERROR in xPDOConnection::connect @ /paas/c0440/www/core/xpdo/xpdo.class.php : 2999) SQLSTATE[08004] [1040] Too many connections
                [2012-12-31 14:28:57] (ERROR @ /manager/index.php) Error preparing statement for query: SELECT `modSnippet`.`id` AS `modSnippet_id`, `modSnippet`.`source` AS `modSnippet_source`, `modSnippet`.`property_preprocess` AS `modSnippet_property_preprocess`, `modSnippet`.`name` AS `modSnippet_name`, `modSnippet`.`description` AS `modSnippet_description`, `modSnippet`.`editor_type` AS `modSnippet_editor_type`, `modSnippet`.`category` AS `modSnippet_category`, `modSnippet`.`cache_type` AS `modSnippet_cache_type`, `modSnippet`.`snippet` AS `modSnippet_snippet`, `modSnippet`.`locked` AS `modSnippet_locked`, `modSnippet`.`properties` AS `modSnippet_properties`, `modSnippet`.`moduleguid` AS `modSnippet_moduleguid`, `modSnippet`.`static` AS `modSnippet_static`, `modSnippet`.`static_file` AS `modSnippet_static_file` FROM `modx_site_snippets` AS `modSnippet` WHERE `modSnippet`.`name` = ?  - 
                [2012-12-31 14:31:21] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /paas/c0440/www/core/cache/phpthumb/phpThumb_cache_eh.frogabogcloud.modxcloud.com_srcd3e3ec3d062325917fb971c446e2c899_paradf896d45f319fa323d889e84ccb98c5_dat0.jpeg
                [2012-12-31 14:31:21] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
                OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 557
                [2012-12-31 14:31:22] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /paas/c0440/www/core/cache/phpthumb/phpThumb_cache_eh.frogabogcloud.modxcloud.com_srcd3e3ec3d062325917fb971c446e2c899_paradf896d45f319fa323d889e84ccb98c5_dat0.jpeg
                [2012-12-31 14:31:22] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
                OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 557
                  Frogabog- MODX Websites in Portland Oregon
                  "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                  Having server issues? These guys have MODX Hosting perfected - SkyToaster
                  • 4172
                  • 5,888 Posts
                  What's the raw output of your MIGX-TV?
                  What's the content of your getImageList - tpl-chunk?
                  How did you configure the mediasource for your image-field?
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 10208 ☆ A M B ☆
                    • 1,780 Posts
                    Quote from: Bruno17 at Jan 01, 2013, 07:18 AM
                    What's the raw output of your MIGX-TV?
                    Not sure exactly what you mean by raw output, but the MIGX TV is populated with copies from the rtfm. One is exact, and another has just the textTV name changed.
                    I've got two image TV's, one called image and one called imageTV (to differentiate it).
                    [
                    {"caption":"Info", "fields": [
                        {"field":"title","caption":"Title"},
                        {"field":"description","caption":"Description","inputTV":"richtextTV"}
                    ]},
                    {"caption":"Image", "fields":[
                        {"field":"image","caption":"Image","inputTV":"image"}
                    ]}
                    ]

                    One template contains this call:
                     [[switch?
                      &get=`[[*optional_slider]]`
                      &c1=`yes`
                      &do1=`
                      <div class="row">
                        <div class="twelve columns">
                          <div id="slider">
                            [[!getImageList? &tvname=`pageBoxesMIGX` &docid=`11` &tpl=`slideTpl`]]
                          </div>
                        </div>
                      </div>
                      `&default=``]]


                    one template contains this:
                     [[switch?
                      &get=`[[*optional_slider]]`
                      &c1=`yes`
                      &do1=`
                      <div class="row">
                        <div class="twelve columns">
                          <div id="slider">
                            [[!getImageList? &tvname=`pageBoxesMIGX` &docid=`11` &tpl=`slideTpl`]]
                          </div>
                        </div>
                      </div>
                      `&default=`
                     <div class="row">
                    <div class="six columns">
                      <img src="http://placehold.it/500x500&text=Image">
                      </div>
                    `]]


                    However, I've removed all this from the second template, left that template assigned to the resource, and I still get the errors posted above. I removed it hours before I captured the errors as well.

                    What's the content of your getImageList - tpl-chunk?
                      [[!getImageList? &tvname=`pageBoxesMIGX` &docid=`11` &tpl=`slideTpl`]]


                    I also tried:
                      [[!getImageList? &tvname=`pageBoxesMIGX` &docid=`[[~id]]` &tpl=`slideTpl`]]

                    which usually works fine to grab the resource.

                    the output is wrapped by 1) orbit slider in one template (example 1) and nothing but what you see above in the second example (divs).

                    How did you configure the mediasource for your image-field?

                    Both default filesystem, and also a custom media source to the image folder. Tried both ways. That works fine to add images either way.

                    This little glitch in figuring it out surprised me since I'm not using the MIGX TV in the second template anymore. I didn't really expect the MIGX TV to even show in that stack trace and I can't imagine why it's even there.

                    An image TV called in the template with [[*simpleImageTV]] is where I get the image name only (no path, just jessica.jpg under the content area) if the TV is set to default output, and if I set it to image output, there's nothing in the output, but the source shows
                    <img alt="" src="jessica.jpg">


                    (I just picked a random image and a test image TV to work with)


                      Frogabog- MODX Websites in Portland Oregon
                      "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                      Having server issues? These guys have MODX Hosting perfected - SkyToaster
                      • 18373 ☆ A M B ☆
                      • 3,141 Posts
                      Can you show the actual media source configuration? It sounds like base_url isn't configured properly if you don't get the path in front of the image name. That, or the TV isn't being processed/prepared when using getResources, but I think you're talking about a simple [[*imagetv]] placement now.
                        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.