Desperate for a bit of Database help re: "Add Functionality" page and install_packages table.

Permalink Browser Info Environment
I have a database error in the "Add Functionality" page that I can't resolve. The error is
An unexpected error occurred.
mysql error: [2006: MySQL server has gone away] in EXECUTE("select tpID, tpHandle, tpName, tpDescription, pkgID from TaskPermissions where tpHandle = 'install_packages'")
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [2006: MySQL server has gone away] in EXECUTE("insert into Logs (logType, logText, logIsInternal) values ('exceptions', 'Exception Occurred: mysql error: [2006: MySQL server has gone away] in EXECUTE("select tpID, tpHandle, tpName, tpDescription, pkgID from TaskPermissions where tpHandle = \'install_packages\'")\n\n#0 /home/candylan/public_html/updates/concrete5.4.1.1/concrete/libraries/3rdparty/adodb/adodb.inc.php(1037): adodb_throw(\'mysql\', \'EXECUTE\', 2006, \'MySQL server ha...\', \'select tpID, tp...\', false, Object(ADODB_mysql))\n#1 /home/candylan/public_html/updates/concrete5.4.1.1/concrete/libraries/3rdparty/adodb/adodb.inc.php(993): ADOConnection->_Execute(\'select tpID, tp...\')\n#2 /home/candylan/public_html/updates/concrete5.4.1.1/concrete/libraries/3rdparty/adodb/adodb.inc.php(1605): ADOConnection->Execute(\'select tpID, tp...\', Array)\n#3 [internal function]: ADOConnection->GetRow(\'select tpID, tp...\', Array in /home/candylan/public_html/updates/concrete5.4.1.1/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78


It's to do with the Designer Content block. I had to delete it and all its associated tables in the DB. This worked well as I had a number of other problems, which are now resolved. The last issue is the "Add Functionality" page has this error at the bottom and the page layout is screwed.

I suspect it has a remnant of the rogue block in it specifically the install_packages table which it mentions.

I was wondering. CAN I DELETE THE INSTALL_PACKAGES TABLE?? Correction!! The table is called TaskPermissions and install_packages is one part of it.

I don't want to try as I suspect it would screw the DB and I just can't afford that but I do need to fix this issue as I need to do some extra work on the site.

Any suggestions would be appreciated. I'm stumped.

Nige

Type: Discussion
Status: New
nige
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
Hi Nige,
I honestly have no idea what is causing the errors you're experiencing. I'm glad you were able to solve the other problems at least. This one seems to be referring to the TaskPermissions table (INSTALL_PACKAGES is one of the permissions a user could have, not the table name). Deleting this table sounds like a very bad idea -- you probably wouldn't be able to access the site anymore if you did that.

Do you have access to PhpMyAdmin? If so, try running that query in the SQL tab for the c5 database. Specifically:
select tpID, tpHandle, tpName, tpDescription, pkgID from TaskPermissions where tpHandle = 'install_packages';


See if it gives you an error -- if it does, perhaps it will be a more descriptive one than just "MySQL server has gone away".

You might also want to try clearing the site cache if you haven't already (from Dashboard -> Sitewide Settings), and also going into your server via FTP and manually deleting all of the files in the YOURSITE/files/cache and YOURSITE/files/cache_object (if that directory exists).
nige replied on at Permalink Reply
nige
Thanks for the reply, I think I might have broken it. The way I "fixed" the DB was to delete

MARKETPLACE_SITE_TOKEN and MARKETPLACE_SITE_URL_TOKEN

from the config table.

I found it in another post and dint know what copy down meant. So I deleted them. It did fix one problem in that I was able to access "Sitewide Settings" without an error and get into Add Functionality albeit with screwed layout and an error at the bottom.

BUT now I can't connect to the community as those two permissions are missing. I'm also wondering if I can fix that.

So there are two issues actually. The "Add Functionality" issue and the connect to community issue.

IS there any way to reset permissions to fix the Marketplace one and maybe the "Add Functionality" problem.

I'm really stumped here and it's one of my most important clients. If I break the database its big trouble.

Nige
nige replied on at Permalink Reply
nige
Backed up database.

I have a backed up database from 25th January and most of it is too old to use and the client would kill me if I restored it as so many changes would be lost but can I use bits of it to fix the existing database??

Nige
jordanlev replied on at Permalink Reply
jordanlev
I have no idea. The errors you are experiencing are not something that I've ever run across before so I just can't answer specific questions about what will and won't work.

Again, before you do ANYTHING else, make a backup of the database you have NOW.

As for restoring bits and pieces from an old backup, that doesn't sound like a feasible solution -- you have no idea what exactly to replace, and it could wind up causing more harm than good.

It really sounds like there's some issue with the connection between the web server and mysql. Did you clear the site cache and delete those files I mentioned in the other reply? Did you ever contact tech support of the web host? I think your web host tech support might be able to provide much more specific help. I just am offering shots in the dark here, but they can actually get onto your server and maybe see what's going on with the database. Perhaps they can restart the MySQL server for you -- these strange errors seem like the kind of thing that might be fixed by that (?maybe? I don't know for sure).
jordanlev replied on at Permalink Reply
jordanlev
I'm sorry, I don't know. First things first, please please please make a backup of your database RIGHT NOW. It seems to be in a somewhat workable state (maybe not perfect, but the site is working), so before you make ANY more changes to anything, back it up so nothing worse happens!

Once you've done that, I think you should be able to reconnect to the community by clicking the dashboard button for it. Or is that what is getting screwed up in the layout and you can't see that button anymore?

Do you by any chance remember what exactly you deleted from the database? And can you say what the exact process for deleting the tables was (for example "in PhpMyAdmin, clicked this, then clicked that")?
nige replied on at Permalink Reply
nige
Yes cheers I will do that unfortunately it is Good Friday tomorrow.

What I did was click the little red x next to the MARKETPLACE_SITE_TOKEN and MARKETPLACE_SITE_URL_TOKEN and that I presume deleted them.

The I was able to access Sitewise Settings where I couldnt before this. So I couldnt clear the cache.

Once accessed I cleared the cache and have it turned off now.

Then I tried to access Add Functionality and that is where I am now.

It was later I tried to reconnect to the community and go the error and I realised that the two permissions would be missing.

I know exactly what they are and where. I was just wondering if I could copy them from the back up DB. It has the market place Key Token number in them.

Thanks for the help.

Nige
jordanlev replied on at Permalink Reply
jordanlev
Back up your database. Then try adding the old tokens back in. I don't think just adding those 2 things will hurt anything, but if it does you'll want to have a backup available to restore from.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.