How to Uninstall Custom Made Designer-Content Blocks?

Permalink Browser Info Environment
I've created a few test blocks on my site, but they do not show up in the "Add Functionality" Admin screen which would allow me to uninstall them.
I tried to manually delete them out of the Blocks folder, but as I expected it blew up on me and caused a chain reaction of errors because of the database dependencies.

Is there an uninstall routine for removing custom built blocks?

Type: Discussion
Status: New
flourish
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
While "Designer Content" itself is an addon that you install/uninstall from the "Add Functionality" page, the blocktypes that you create with it are *not* addons -- they are just blocktypes and they live in your site's top-level "blocks" directory. Hence they can be uninstalled via Dashboard > Stacks & Blocks > Blocktypes (click on the blocktype in the list there, then click the red "Remove" button).
GundlachMarketing replied on at Permalink Reply
GundlachMarketing
and if you already deleted the blocks folder from the /blocks/ directory? (I know... I'm an id10t)

nevermind, it's answered here
jordanlev replied on at Permalink Reply
jordanlev
Ah yeah, that is an annoying problem (don't be too hard on yourself -- this stuff is not very well-documented).

The solution depends on your exact situation, hopefully one of these answers your question:
http://www.concrete5.org/marketplace/addons/designer-content/forums...
http://www.concrete5.org/marketplace/addons/designer-content/suppor...
http://www.concrete5.org/marketplace/addons/designer-content/suppor...

If not, post back with more details about what you tried and what is/isn't working and I can try to help more.

Best of luck!

-Jordan
flourish replied on at Permalink Reply
flourish
Yeah...so that's exactly what I did when I first tried to get rid of my custom blocks. I just went to the blocks folder and deleted them (DOOOHHHH)!!!

It threw a nasty error telling me that the controller for my custom block could not be loaded.

Solution:

Go into your database (I used phpMyAdmin) go to the search tab, select all tables, and do a search for your custom block name (it should have displayed it in the error message) and delete all instances of it.

It's definitely not the way I plan on uninstalling in the future, but it got my site back to normal.
flourish replied on at Permalink Reply
flourish
Yeah...so that's exactly what I did when I first tried to get rid of my custom blocks. I just went to the blocks folder and deleted them (DOOOHHHH)!!!

It threw a nasty error telling me that the controller for my custom block could not be loaded.

Solution:

Go into your database (I used phpMyAdmin) go to the search tab, select all tables, and do a search for your custom block name (it should have displayed it in the error message) and delete all instances of it.

It's definitely not the way I plan on uninstalling in the future, but it got my site back to normal.
GundlachMarketing replied on at Permalink Reply
GundlachMarketing
Thanks Flourish worked great.

Jordanlev, I tried making a similar block and importing it. that didn't work for me, but then I tried Flourish's suggestion and it worked. So that's where I stopped.
soundbytes replied on at Permalink Reply
soundbytes
I uninstalled a Designer-Content created custom block using the dashboard routine. When I then tried to create another block with the same Name the add-in did not allow it.
I checked the files on the Server an well as the data base and found that the block had not been removed completely.
The block directory was still there complete with all the files and also the btDCMyBlockType table in the data base.

Since I am new to concrete5 I have several questions:
- Are the files and the data base table left in place purposely or is that an error?
- If it is an error then how can it be fixed? Could the Addin be patched to put that right or could that be a bug in the concrete5 core?
- Would it be safe to remove the Directory and the database table manually? Could there be any other left over elements of the removed block that might be causing trouble lateron?

Thanks a lot!

BTW: I am using version 5.6.2.1 of concrete5. The Server runs php version 5.2.
flourish replied on at Permalink Reply
flourish
Soundbytes,
I ran into the same problem when I first started using Designer Content.
The Designer Content Addon is the main "Program", for lack of a better term. It's really a custom block type generator...And the blocks it generates are not "Addons" so you won't be able to use Concrete to uninstall them. A Custom block is just presentation code wrapped around a set of Concrete5 functions. They live in the Blocks folder of your site.

The steps I used to uninstall the custom block types:

1. Login to phpMyAdmin, do a search for the exact block handle you want to remove (delete that record from the blocks table, DO NOT DELETE WHOLE TABLE).

2. FTP into the root of your site and find the "blocks" folder. Delete the block folder that is named the same as the block handle you just deleted from the database.

3. You're done, grab a cold drink!

Hope that helps.
soundbytes replied on at Permalink Reply
soundbytes
> ...And the blocks it generates are not "Addons" so you won't be able to use Concrete to uninstall them.

I know that the user created blocktypes are stored independently of the addon. Still there is a way to uninstall them via the concrete5 Dashboard. Jordan gave a clear description of how this is done.
I followed the steps an ran into the Problems that I described in my earlier post.
jordanlev replied on at Permalink Reply
jordanlev
After the blocktype folder (in your site's top-level /blocks/ directory) is generated by Designer Content, it is then completely out of the hands of the Designer Content addon -- from that point on it is exactly like a blocktype that you could create "by hand" yourself, and it operates under the normal "rules" of custom blocktypes. Specifically: when you uninstall the blocktype (via Dashboard > Stacks & Blocks > Block Types, click on the blocktype in the list, click the "Remove" button), C5 will not actually delete anything from your server, nor will it delete the database table in your database. Hence, you will need to remove the blocktype folder yourself (for example, if the custom blocktype had the handle "my_awesome_thing", then it would be the "SITEROOT/blocks/my_awesome_thing" directory on your server).

Note that this is different from uninstalling addons -- those are handled in a different way. I wish it were more consistent between the two, but for whatever reason it's not.

Hope that helps!

-Jordan
sully210 replied on at Permalink Reply
sully210
Hey Jordan, me again. Sorry. I was deleting blocks and after deleting about 5, on the sixth one the five that I removed showed up at the top of the screen with a heading "Waiting to be Installed" and a green install button for each. I tried one more time and while I was doing it knew it was a mistake. I got this error and now every time I try to even go to blocks I get the same error:
Fatal error: Cannot redeclare class BullBarListBlockController in /home/goldclub/public_html/angrybullhartford/blocks/bull_bar_list/controller.php on line 102
Any ideas? I cleared the cache but that didn't help.
Thanks
sully210 replied on at Permalink Reply
sully210
OK, I renamed controller.php and I am able to get back to stacks, whew. However, I still have the removed blocks awaiting install. Should I just delete the others I need to or do something else? I put a quick screenshot here:http://angrybullhartford.com/await_install.png...
Thanks again.
jordanlev replied on at Permalink Reply
jordanlev
If you're told Concrete5 to uninstall the blocktype via the dashboard "Blog Types" page (so they're in the "waiting to be installed" section of the list), then it is totally okay to delete the blocktype's folder from your server.

Is that what you are asking, or have I misunderstood the problem?

-Jordan
sully210 replied on at Permalink Reply
sully210
Cool, I just didn't want to screw anything up. Thanks again Jordan.

Jeff

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.