We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    OK, my theory about it containing a snippet is wrong. It may or may not be relevant, but it looks like you're using the fastField extra. That has known issues with MODX 2.6.5 and could be a factor in your problem. Is there anything in the MODX error log (Manage -> Reports -> Error Log).
      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
      • 46886
      • 1,154 Posts
      Two more quick things:

      When we see what the 'real' output of the tools is, we will know whether you still must fix the styling, the fact that the picture is cut off. Later we can fix that part.

      Also you will want to edit that default content, in the event it appears on occasion.
        • 46886
        • 1,154 Posts
        Hmm BobRay has an important point. Looks like the fastfield is used for this area at page bottom (in the primary featured-items-panel chunk, the code starting with a # I believe
          • 53362
          • 26 Posts
          Hello and thanks again for your help with this.

          I am trying to follow your instructions and I am creating the new Resource as shown in the attached screenshot. Sorry for my lack of knowledge but I am unsure how to place a resource in an ID.

          Thanks for your patience.

          Quote from: nuan88 at Oct 30, 2018, 09:36 AM
          Bob its in the picture attached above. It just has three chunks basically. For now can we not worry about the front page, which seems ok even if it can't be found. We can find that later for sure.

          Ok I think I see what is going on, at least a little bit. The tools are in those chunks.

          In this case what you are getting on those pages is default text, as the parent resource is empty. Here is the code where this happens:

          [[+latest-news:empty=`this default content will show if empty'


          The tool is getResources, so let's talk about how it gets the info. Basically you should look for the parent resource (4 for the first one, 21 for the second two which needs fixing, they should each be different).

          Try this: Make a new resource and place it in resource 4 (ID number of resource). This new page will be your content about your new (dummy) event. Publish it too.

          That should make it visible in the tool and it should output on the page, no more latin. For each new event, write it up in a new resource, drag and drop into the parent resource (which can be a container and/or have its own content), and publish.

          Because you have the same parent resource for the second two tools (getResource calls), they will be identical, so you will want to make a new resource and change the 21 to that resource number. Then you will have three folders and the tools will always dynamically go get...hmmm some content let's see...I suppose it will be the latest item (its limited to one) but not positive now.

          So, give it a try and let us know!

          PS I still don't know why the front page is getting different contents...
          [ed. note: lemondrop last edited this post 7 years, 10 months ago.]
            • 53362
            • 26 Posts
            Thanks for your reply. It is appreciated.

            The error log is quite large, 168mb. Can you advise me what I should be looking out for in it?

            I believe the site was recently updated to 2.6.5 for security reasons.

            Thanks again for your time.



            Quote from: BobRay at Oct 30, 2018, 09:40 AM
            OK, my theory about it containing a snippet is wrong. It may or may not be relevant, but it looks like you're using the fastField extra. That has known issues with MODX 2.6.5 and could be a factor in your problem. Is there anything in the MODX error log (Manage -> Reports -> Error Log).
            [ed. note: lemondrop last edited this post 7 years, 10 months ago.]
              • 46886
              • 1,154 Posts
              Ok for the resource, here is a picture, its in the manager on the left hand side. The middle tab Elements is templates and chunks, so you have found that, and then the left one is files where you can put site pictures and your css code is here too usually.

              Every resource gets an id on first save. You can see the numbers after the two resources in the picture.

              This is your tree. It will have all the pages of the site plus some special resources for things like users and login.

              For those three items, you would make a new resource, the first button on the very left, and then save it. Let's call it special dish 1. After you save it and refresh, you can put some contents in the resource.

              You can play with the contents. Some setups will output the title of the resource on the page automatically (its a small bit of code). Put some info into the resource text area for the special dish. Also, those extra fields like long title and description are useful in pushing info to sites like google, so it can be helpful for keywords.

              Anyway, now that info will be fed to the tool (we hope) only when you move this resource into the resource with id 4. The id 4 resource will become a container when you drag and drop the new resource into it.

              After that the tool could work, its definitely looking for resource id=4 to get the data.

              Make a little more sense now? The resources are where most of the content of your site are placed.

              Also, you didn't upload the picture you were going to send.

              For the errors, just go to the end of the list and check any that are happening recently. [ed. note: nuan88 last edited this post 7 years, 10 months ago.]
                • 53362
                • 26 Posts
                Hello

                Thanks very much for your help and patience.

                I created the resource special dish 1 and saved it as shown in resouce1.png

                The new resource has id=36. I have dragged this new resource to the resource with id=4. I am however not sure what I have done is right. I have shown what I have done in resource2.png

                Looking through the log I notice this error seems to reoccur:

                Could not construct or prepare query because it is invalid or could not connect: SELECT `modChunk`.`id` AS `modChunk_id`, `modChunk`.`source` AS `modChunk_source`, `modChunk`.`property_preprocess` AS `modChunk_property_preprocess`,

                Thanks again for your time and help.
                  • 46886
                  • 1,154 Posts
                  Ok you've done what I asked, but now that I can see what is going on I think this error is the biggest issue.

                  The tool is working on the front page but not on the inside page, that's weird. That resource of 4 doesn't look correct to me, as that folder is for your Xmas stuff. And resource 21 doesn't even exist.

                  It seems to me the work wasn't done, so the little bits aren't right. I suppose the intention was to have three resources as folders for resources (I know that looks repetitive), Dishes Events News. So just as I said the 21 should be changed, it appears all of them should be changed. You can just make those folders and put the id numbers in the code for each of those, as the parent resource. But its unclear to me if that will change anything now.

                  One thing you could do that is relatively easy, if these boxes are the issue, is put some real text in the default space that I showed you. It wouldn't fix the pictures but at least you could have suitable text there. These tools are used when you want to dynamically pull the newest of many items for example, but you could literally just change the default text to the featured dish, and put a link to the page about it. You could change that once a season directly, sometimes developers want everything to be done with tools, even when its not necessary.

                  Anyway let's deal with the error, seems its related and it could fix the problem, possibly.
                    • 46886
                    • 1,154 Posts
                    @BobRay, doesn't that error look like fastfield? preprocess...so

                    I notice the fastfield code only seems to be in the featured-items-panel chunk, and its just some styling pulled in, can we just cut it out completely and work from there? I attach the picture again for reference.

                    I can see the fastfield code but is the part about

                    {target:'.uk-panel'} part of it as well?

                    https://modx.com/assets/attachments/40/562419/panel.png

                    Its possible to just fix the styling with hard code in this chunk to replace the fastfield, it seems to me. Just make the background as translucent and put in some height minimum, maybe fix the minimum img height as well.
                      • 3749
                      • 24,544 Posts
                      That could well be the problem. FastField replaces the MODX parser with its own (and I've never thought that was a good idea). I think the FastField parser may not play nice with more recent versions of MODX, so getting rid of that FastField call would probably be a good idea.

                      Uninstalling and removing the FastField extra might be a good next step.

                        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