We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15953
    • 123 Posts
    I’m using Revolution 2.0.5. I can’t remove a template. Revo says it’s in use but it isn’t. Some of the resources supposedly using it don’t exist anymore and others are using a different template. Can someone offer advice?
      • 26016
      • 561 Posts
      For your first line of defense, try:

      Site... Remove Locks
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 15953
        • 123 Posts
        did not work.
          • 26016
          • 561 Posts
          Interesting... you may have found a bug. If you’re pretty geekie, you can probably look at the database and find connections between the template and docs attached to it. You could make a note of the number of that template. Then browse your site_content table, looking at the "template" field. If you see that template’s number in that field on a record, you’ve found a smoking gun.

          To test this, I just made a doc, and then deleted it. Then I looked at the table, and the doc is still there. Then I used the "garbage can" to "remove deleted resources". THEN the document was actually gone from the database.

          Any chance you have deleted items still visible in the manager with the line through it? Maybe this could be why your system is still finding them. That’s my best guess. If that’s not the case, then you’ve got me.

          I can see where this type of situation may not have been thoroughly tested, as it’s not something you’d necessarily do that often. I wonder if anyone else has a thought.

          Good luck, Dave
            MODx and Wordpress development
            Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
            • 15953
            • 123 Posts
            Then browse your site_content table, looking at the "template" field. If you see that template’s number in that field on a record, you’ve found a smoking gun.

            Sure enough, I see an old F.A.Q. pagetitle with id of 4 attached to that template. That resource was deleted and trashed a long time ago. The new F.A.Q. is resource ID 7 assigned to a different template. Do I just delete the row for id 4 and all the other id’s that are non-existent? Or might there be a relationship with other tables?

            I’ve known about this "bug" since I first started using Revolution. I got into trouble with permissions and basically couldn’t give myself permission to do anything in Manager. At that time I found things "out of sync" between the database tables and what I saw in manager. I think Revo needs some kind of "clean up" utility that removes unused database entries and syncs Manager structure with the database.
              • 26016
              • 561 Posts
              Isn’t that wild? Mine seems to be working, but possibly because I didn’t exactly do what you did. I only have a couple templates in my Revo test system. And all I did was create and delete the doc, I didn’t change its template.

              Did you create your original doc with one template, and then change it to another, before deleting? Maybe that scenarario causes the bug to emerge, or another intermediate step.

              In any case, it does sound like you’ve found a bug worth reporting.

              Cheers
                MODx and Wordpress development
                Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
                • 22303 MODX Staff
                • 10,725 Posts
                Apparently you did not empty the trash or the old FAQ that references that template should no longer be in the database. So if there is any error here, it would have to be with emptying the trash. However, I cannot reproduce any problems doing this. huh
                  • 15953
                  • 123 Posts
                  Quote from: OpenGeek at Dec 14, 2010, 10:05 AM

                  Apparently you did not empty the trash or the old FAQ that references that template should no longer be in the database. So if there is any error here, it would have to be with emptying the trash. However, I cannot reproduce any problems doing this. huh

                  If I didn’t "empty the trash" (remove deleted resources?) then why does the resource not still appear with a line through it? In database terminology, I don’t think we’re missing referential integrity.
                    • 22303 MODX Staff
                    • 10,725 Posts
                    Quote from: kirkhuyser at Dec 14, 2010, 12:08 PM

                    Quote from: OpenGeek at Dec 14, 2010, 10:05 AM

                    Apparently you did not empty the trash or the old FAQ that references that template should no longer be in the database. So if there is any error here, it would have to be with emptying the trash. However, I cannot reproduce any problems doing this. huh

                    If I didn’t "empty the trash" (remove deleted resources?) then why does the resource not still appear with a line through it? In database terminology, I don’t think we’re missing referential integrity.
                    It does show them with a red line through it in mine when I delete a Resource. huh
                      • 15953
                      • 123 Posts
                      Quote from: OpenGeek at Dec 14, 2010, 12:11 PM

                      It does show them with a red line through it in mine when I delete a Resource. huh

                      Me too. But click the trash can (Remove Deleted Resources) and it’s gone in Manager. So if it still appears in the database table there is a lack of referential integrity.