Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2011-05-10 22:25:24

MS_DA
Member
Registered: 2011-04-26
Posts: 401
Website

[FIXED] Error message if deleting a category

I´m getting the following error if i delete a category

Query: SELECT cat_id FROM video_categories WHERE parent_id = LIMIT 1
Error Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 4
Error Number: 1064

Ben

Last edited by MS_DA (2011-05-10 22:26:09)

Offline

#2 2011-05-10 22:38:56

marshalbros
Member
Registered: 2011-05-05
Posts: 42

Re: [FIXED] Error message if deleting a category

I get this too and previously posted a thread on it.  No resolution yet.

Offline

#3 2011-05-10 22:39:57

marshalbros
Member
Registered: 2011-05-05
Posts: 42

Re: [FIXED] Error message if deleting a category

Offline

#4 2011-05-10 23:00:07

MS_DA
Member
Registered: 2011-04-26
Posts: 401
Website

Re: [FIXED] Error message if deleting a category

Ohh... didn´t see your topic about this error - thanks smile

Offline

#5 2011-05-11 06:43:18

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED] Error message if deleting a category

This happens when you delete a category? I just tested this and i can delete a category without any problems. Do you have subcategories enabled?


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#6 2011-05-11 06:49:45

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED] Error message if deleting a category

Ok. Got it. It works from the icon on the right, but returns a error from the mass actions checkbox on the left.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#7 2011-05-11 07:01:00

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED] Error message if deleting a category

To fix edit admin/modules/video/components/category.php and find the following line:

if (isset($_POST['submit_actions'])) {

a few lines below the above line find the following lines:

                if ($this->delete_video_category($cat_id)) {
                    $messages[] = 'Category deleted!';
                    $cache->remove('categories');
                } else {
                    $errors[] = 'You cannot delete this category! It contains subcategories!';
                }

replace with:

               $success = TRUE;
                foreach ($ids as $cat_id) {
                    $cat_id = (int) $cat_id;
                    if (!$this->delete_video_category($cat_id)) {
                        $success = FALSE;
                    }
                }

                if ($success === TRUE) {
                    $messages[] = 'Selected categories deleted!';
                } else {
                    $errors[]   = 'Failed to delete one or more categories because they contain subcategories!';
                }

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#8 2011-05-11 08:50:24

MS_DA
Member
Registered: 2011-04-26
Posts: 401
Website

Re: [FIXED] Error message if deleting a category

This was a quickly fix - works perfect now tongue

Many thanks!

Ben

Offline

Board footer

Powered by FluxBB