delete a category

Once you've installed phpList... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation.

delete a category

Postby mango852 » 6:54am, Mon 25 Aug, 2014

Hi, new user here - running version 3.07
i imported and created list and then categorised them - but i made a mistake and used an ' to create women's and the category comes out as women\'s - it was ok to add a list to.

but now i cant delete the category or remove the list from the category.

i've tried deleteing the category from the list - but it still shows on the dropdown menu on the subscriber lists page. but choosing the category women\'s doesnt show the subscriber list...

so at a loss as to how move the subscriber list to a new category womens and how to delete the women\'s category which obviously messes with code in some way.

Sill error i know but stuck. Thank you for your time
mango852
phpList newbie
 
Posts: 2
Joined: 6:40am, Mon 25 Aug, 2014

Re: delete a category

Postby Dragonrider » 8:42am, Mon 25 Aug, 2014

I don't say that this is the "RIGHT" way to do it and someone will no doubt come along soon with the right method, but this worked for me.

Log in to your server's cPanel, find and click on phpMyAdmin. Locate and open your phpList database and browse to the table entitled _list (there will be a prefix of course, phplist or whatever you set originally) and find your list with the woman\'s category (last column in the table)
Edit the row and delete the category and GO to save.

If you are not at all confident with phpMyAdmin this is the MySQL code that will empty the category for you.

Code: Select all
UPDATE `#DATABASE#`.`#TABLE_PREFIX#_list` SET `category` = '' WHERE `#TABLE_PREFIX#_list`.`id` = ##;


Change #DATABASE# for your full database name and both #TABLE_PREFIX# for the prefix that you use. The 'id' ## needs to match the row id. Now paste the code in to the box below "Run SQL query/queries on database" on the SQL tab clearing any contents already in the box, and click GO.
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Re: delete a category

Postby duncanc » 9:50am, Mon 25 Aug, 2014

You can change the set of categories on the Settings page, the item "categories for lists". So add your new one and delete the one that you do not want.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: delete a category

Postby mango852 » 3:19am, Tue 26 Aug, 2014

Thank you both for your replies

@dragonrider - that works perfectly thank you!

@duncanc - I replicated the problem to test your method, but unfortunately for me it didn't work.
using a test list i added the category men's - then added a list - so far everything fine... but you cant use any of the lists assigned to the men's category.
On the subscriber lists page, the dropdown category shows the men's category but as before highlighting it/clicking on it does nothing. I tried editing on the settings page as you suggested. And also on the categorise lists/configure categories page - but it didnt clear the men's category or make the assigned list available to add to a different category.
So had to use dragonriders solution, which is simple even though phpmyadmin initially looks daunting.

i'm not sure why it happens - but maybe a little note in the faq's to not use an apostrophe in category names might save someone else a few hours of frustration.

Thanks again for your prompt and helpful feedback
mango852
phpList newbie
 
Posts: 2
Joined: 6:40am, Mon 25 Aug, 2014

Re: delete a category

Postby duncanc » 11:01am, Tue 26 Aug, 2014

I hadn't realised that you were identifying a problem with using the single-quote. That is a bug and I have reported it on the tracking system https://mantis.phplist.com/view.php?id=17328.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London


Return to Questions and Problems after Installing

Who is online

Users browsing this forum: No registered users and 2 guests

cron