We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • discuss.answer
    • 3749
    • 24,544 Posts
    As you probably know, there's almost never just one solution to a problem in MODX.

    One way might be to leave the TVs, but not use them for the display. The values could be written to a custom DB table when the resource was saved in a plugin attached to OnDocFormSave. The technique for creating the custom table is described here: https://bobsguides.com/custom-db-tables.html.

    The article doesn't use a plugin, but rather a regular HTML form, but once the table exists, the plugin could write the data if you want the users to continue using the TVs -- or you could move to using a page with the form.

    Another way to go would be to extend the modResource object with ClassExtender and use the snippet that comes with it to set the placeholders. The fields would appear as extra input fields on the Create/Edit Resource panel rather than TVs.

    Another option would be to use MIGX. I don't have a lot of experience with it, but people love it.

    Since there aren't that many of them, you could also create a System Setting for each field, use ClientConfig, or a custom form, to let users update them, and display them with System Setting tags:

    [[++setting_name]]


    That should be quite fast, since System Settings are automatically loaded on each request. The down side is that it would slow down loading of all the site's pages, though probably not by a noticeable amount (most likely a few milliseconds).

      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
      • 38783
      • 571 Posts
      Quote from: vibedesign at Nov 16, 2017, 07:43 PM
      Well, it looks like a miracle has happened because the site is working like it used to and this is without me doing anything. I really don't know what caused the problem and I'm a little afraid it might come back.

      However thank you all for your great support so far, also thanks for the hint with MIGX, didn't even know such a plugin exists, will definitely use that the next time I need a bunch of TVs.

      The page is loading fast again, but the table is not present. Is it possible that you forgot to put it back after removing it during testing?
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 53910
        • 26 Posts
        @BobRay: Thank you for this great advice, will definitely look into those methods!

        @Andy Tough: It is showing up for me in different browsers and PCs, maybe you have still a cached version?

        Is the table visible and loading fairly quickly for anyone else?
          • 17301
          • 932 Posts
          Nope it's not being posted out for me also.
            ■ email: [email protected] | ■ website: https://alienbuild.uk

            The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
            • 53910
            • 26 Posts
            Oh, sorry I updated the url yesterday as well. You should see it here now: http://bodhi-esslingen.de/yoga-kurse-esslingen-kursplan-bodhi.html
              • 4172
              • 5,888 Posts
              It is faster than before, but still takes much longer than the other pages
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 38783
                • 571 Posts
                Quote from: vibedesign at Nov 17, 2017, 10:33 AM
                Oh, sorry I updated the url yesterday as well. You should see it here now: http://bodhi-esslingen.de/yoga-kurse-esslingen-kursplan-bodhi.html

                Ha ha, that would explain it! The table is showing and the page loads in about 3 seconds.
                  If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                  email: [email protected] | website: https://andytough.com
                • discuss.answer
                  • 17301
                  • 932 Posts
                  That works and yeah it's faster. Did anything change since yesterday? A few notes on your mark up though for your main content you have it encased in a paragraph tag but your content contains headings, paragraphs and other tags already and could cause issues. Firefox also states that you have a stray ended div tag just before the closing body tag, but I couldn't find the source on quick inspection but you may have multiple closing div tags somewhere on the page which may also cause issues.
                    ■ email: [email protected] | ■ website: https://alienbuild.uk

                    The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
                    • 53910
                    • 26 Posts
                    Quote from: lkfranklin at Nov 17, 2017, 10:54 AM
                    That works and yeah it's faster. Did anything change since yesterday? A few notes on your mark up though for your main content you have it encased in a paragraph tag but your content contains headings, paragraphs and other tags already and could cause issues. Firefox also states that you have a stray ended div tag just before the closing body tag, but I couldn't find the source on quick inspection but you may have multiple closing div tags somewhere on the page which may also cause issues.

                    So it looks like the "kursplan" went back to messing up again...
                    Although I didn't touch anything which I could relate to the loading time of this site.

                    I will check the markup again. The reason for included headings and such is again me using a TV to transport custom input data to the site and the users are able to fill them in with an WYSIWYG-Editor. Sure, I could embed the TV in a div but I haven't done this so far, as I will need to adjust the styling as well.

                    In general I will need to look into a different method of creating the table now and as well providing user given input to the site.
                    Which method do you guys use to accomplish that? What I need is a good way to have users without any coding skills input their texts and show them on the site. If possible without me coding a seperate form but all within the manager of modx.

                    I know BobRay mentioned a bunch of methods above (thank you again) and I will do more research on how they work as I've never used them before. Just curious what you all use in this case and what you would suggest me doing?

                    Edit: attached is the slow-query-log, where you can see that it took like 36s to write the table site. Also there is this mod session entry which I'm not sure about... [ed. note: vibedesign last edited this post 6 years, 5 months ago.]
                      • 38783
                      • 571 Posts
                      Could you post your screenshot somewhere else and link to it? Attachments on the Forums don't seem to have been working for a while.
                        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                        email: [email protected] | website: https://andytough.com