We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30223
    • 1,010 Posts
    Sounds to me you simply have a copy and paste error. What do you have in Modules>>dbEdit in the manager? It should just be the content from dbedit.module.php.txt
      • 33988
      • 110 Posts
      fixed my previous issue, you were correct about the files. However, now when i attempt to add a table, I click save to save the table configuration of an existing table and i receive this error.

      ". Save Configuration
      Unable to save configuration. Reason is:

      * Return to dbEdit module"
        Sal Sodano
        President & Co-Founder of SkyToaster
        My Website Salscode.
        • 30223
        • 1,010 Posts
        The message should include the error message returned from $modx->db->getLastError(). This clearly doesn’t return anything useful that’s why you’re not seeing anything after "Reason is:"

        Firstly check that you have a "{table_prefix}dbedit_configs" in your database. (where {table_prefix} is the modx table prefix as set during modx installation). dbEdit should automatically create the table but if it’s not there you may have to create it yourself.

        CREATE TABLE `{table_prefix}dbedit_configs` (`recID` TINYINT (3) UNSIGNED AUTO_INCREMENT, `name` VARCHAR (128) NOT NULL, `comment` VARCHAR (255) NOT NULL, `config` TEXT NOT NULL, PRIMARY KEY(`recID`), UNIQUE(`name`));
        (again replace {table_prefix} with the actual modx table prefix).

        Also check that this table is readable by the mysql user that you have configured for modx.

          • 1343 ☆ A M B ☆
          • 2,213 Posts
          Hello,

          The table in question exists and the system should have access to the table in question as it’s in the modx database. The user has all permissions to the table in question as well. The server is apache 2.2.9, php 5.2.8, mysql 5.0.48.

          Any other suggestions?
          AMDbuilder
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 36695
            • 47 Posts
            This is so much better than the junk I was trying to write to do the same thing! smiley

            However, just thought I’d point out that the code uses quick php tags (
            <?=
            ), and there are also a couple of instances of
            <? echo
            . Neither of these work on my server (I’m not sure if the second one is even valid...?). A search and replace across all the files to make it
            <?php echo 
            worked for me.

            Thanks for your work on this
              • 30223
              • 1,010 Posts
              @AMDbuilder Uhm,.. no at this moment I don’t have any suggestions other than perhaps adding some debugging code into module.save.configuration.inc.php to see if you can spot where it’s going wrong.

              @prioritypie Thanks for that. I’ve updated the zip file and added it to my original post above.
                • 1343 ☆ A M B ☆
                • 2,213 Posts
                Hello,

                I just installed the latest version and I still have a problem so I am tempted to say the problem could be related to a field in the DB. Are there any fields that might cause problems?

                I would add some debugging code, but I wouldn’t know where to start.

                AMDbuilder
                  Patrick | Server Wrangler
                  About Me: Website | Tweets |  MODX Hosting
                  • 1343 ☆ A M B ☆
                  • 2,213 Posts
                  I just wanted to respond and say that the problem has been resolved. I forgot the exact reasoning, but basically the way dbedit validates fields and my db structure didn’t jive well. TobyL was able to send me some updated files to fix the problem. I am guessing he will include those in a later release for anyone else having the same issues.

                  AMDbuilder
                    Patrick | Server Wrangler
                    About Me: Website | Tweets |  MODX Hosting
                    • 30223
                    • 1,010 Posts
                    Uhm,.. yes I will but I want to clean up a few other things first.... Just shout if you get impatient smiley
                      • 5920
                      • 19 Posts
                      Very cool, I’ll have to download this and give it a try.