Error trying to access Add functionality page

Permalink Browser Info Environment
After using Designer content I have now got an error "Fatal error: Cannot redeclare class TeammemberBlockController in .../blocks/_delete/controller.php" when trying to access the functionality page.

I have attempted to delete it the block via the ftp to stop this error as well but the ftp is refusing to let me delete anything within the block folder or change their permissions, keep getting Error -144: remote delete failed.

I have also deleted the block reference in phpmyadmin but still cant stop this error occurring. Does anyone know what i am doing wrong or anything i have missed as I have become so frustrated with this problem :(

Type: Discussion
Status: New
peterorpete
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
Did you create a block with Designer Content that had the handle "teammember"? Or one with the handle "_delete"? It's very strange that your error message is showing the path "blocks/_delete/controller.php" -- unless you specifically gave the block the handle "_delete" or specifically created that folder and moved things there I have no idea how that could have happened. If you can't delete the block from your server you will need to contact your web host's tech support and ask them to give you permissions to do so (or to delete it for you if they can't give you those permissions).
If none of that works, you can also try editing that blocks/_delete/controller.php file and just changing the controller name from "TeammemberBlockController" to something else like "DeletedTeammemberBlockController".

And this is kind of unrelated but someone else ran into a terrible horrible problem when they didn't back up their database before accidentally deleting the wrong table -- please make sure you back up your database before doing any more modifications in phpMyAdmin.

Feel free to post back here with more details if you are still having trouble with this.

-Jordan
peterorpete replied on at Permalink Reply
peterorpete
sorry, i changed the name since the original error to see if i could delete the file if it was renamed. I have also tried to edit the controller.php but am unable to save the file, I have asked my host tech guy to manually delete it, should hopefully do the trick. Thanks for the quick response
onjegolders replied on at Permalink Reply
onjegolders
Hi there, did you ever find a solution?

I'm having an almost identical situation and thinking I'm going have to start the site from scratch

Luckily I'd only just started ...
pribeiro replied on at Permalink Reply
pribeiro
Anyone found a solution?! I'm having the same problem :/
onjegolders replied on at Permalink Reply
onjegolders
I think my problem came from remaking a block with either the same class name or handle name.

I couldn't delete via FTP, I could only rename which worked temporarily but other C5 pages ended up looking for code that didn't exist.

My solution finally was an odd one.

I happened to have a joomla install on the same domain. On Joomla there is an add-on called "extplorer", (there must be an equivalent outside of Joomla??)

Accessing it from there, I had the required permissions to delete the blocks which resolved my problem.

Perhaps there is an experienced dev out there who could recommend a way to have this functionality without having to install Joomla?!
peterorpete replied on at Permalink Reply
peterorpete
Hey i did sort it, i rung up the company that hosts the site and asked them to delete the files for me, as i didn't have the neccessary permissions. But now I'm a bit scared to use it incase it happens again though
pribeiro replied on at Permalink Reply
pribeiro
Guys, just found another simpler solution, just rename the /blocks folder to something like /blocksDeleted and create a new /blocks folder (don't forget to CHMOD777 this folder). The only boring thing is that you'll have this trash folder (/blocksDeleted) taking up space on the server, but then you'll have more time to contact your host and ask them to delete it.
onjegolders replied on at Permalink Reply
onjegolders
That was my initial solution but I encountered a problem when trying to access the "Add Functionality" page in the dashboard,

I got a fatal error because the deleted/renamed block was still being called. That's just my experience and it may have been due to different reasons.

I would be interested in knowing if there were any other ways of getting permissions over folders/files without using the Joomla add-on that I just happened to have on the server...
jordanlev replied on at Permalink Reply
jordanlev
I think if you check the "remove files from server" checkbox when uninstalling the block, that might work.
The problem is that the php code originally created those files (as opposed to most other files on your site which were "created" by you when you uploaded them via FTP), so the owner of the files is the web server user, not you. I think if you do what I suggest above, then it's the webserver again that's doing the removal and not you so it should work (although I'm not 100% sure about this).

Sorry it's giving you all this trouble :(

-Jordan
onjegolders replied on at Permalink Reply
onjegolders

Thanks Jordan,

I hadn't noted the remove files from server option but will be sure to give that a go if I have it again. Please don't apologize, I appreciate the fantastic support!

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.