This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

Cannot Delete Article Pages


avatar
wright 42
From: -
Cannot Delete Article Pages

I have just run into a problem. I cannot delete article pages.

I thought maybe I did something to damage the database so I tried making a fresh install. I think created a new article with 4 pages and again cannot delete any of the pages.

I receive no errors it just takes me back to the "Manage Articles" page.

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: Cannot Delete Article Pages
avatar
OP 42
From: -
Right my fault, I just went with the first line the search engine brought back.
1 Re: Cannot Delete Article Pages
avatar
Editor
0
From: -
This is a different function (deletearticle) while the function I modified was deletepage below.
1 Re: Cannot Delete Article Pages
avatar
OP 42
From: -
I might have missed something, that file you attached fixed the problem. I opened it to check the code.

You said replace...

$database -> dbquery( "DELETE FROM " . DB_PREFIX . "esselbach_ct_articlespages WHERE articlepage_article = '" . $options[ 1 ] . "'" );
$database -> dbquery( "DELETE FROM " . DB_PREFIX . "esselbach_ct_articlescomments WHERE articlecomment_article = '" . $options[ 1 ] . "'" );

With this...

$database -> dbquery( "DELETE FROM " . DB_PREFIX . "esselbach_ct_articlespages WHERE articlepage_id = '" . $options[ 1 ] . "'" );

But this was in the file you attached...

$database -> dbquery( "DELETE FROM " . DB_PREFIX . "esselbach_ct_articles WHERE article_id = '" . $options[ 1 ] . "'" );
$database -> dbquery( "DELETE FROM " . DB_PREFIX . "esselbach_ct_articlespages WHERE articlepage_article = '" . $options[ 1 ] . "'" );
1 Re: Cannot Delete Article Pages
avatar
Editor
0
From: -
This modification works fine on my test installation. Here my modified adminmanagearticles.php file.
   adminmanagearticles.zip
1 Re: Cannot Delete Article Pages
avatar
OP 42
From: -
No it didn't work. I just tried creating a new article with a few pages.

In the Manage Articles section it says "3 pages".

Then I go in and delete a page and in the Manage Articles section it says "2 pages".

However if I go back into that article all 3 pages are still there.
1 Re: Cannot Delete Article Pages
avatar
Editor
0
From: -
This should fix this problem. Open /cadmin/articles/adminmanagearticles.php in an editor and replace:

          $database -> dbquery( "DELETE FROM " . DB_PREFIX . "esselbach_ct_articlespages WHERE articlepage_article = '" . $options[ 1 ] . "'" );

$database -> dbquery( "DELETE FROM " . DB_PREFIX . "esselbach_ct_articlescomments WHERE articlecomment_article = '" . $options[ 1 ] . "'" );


with:

           $database -> dbquery( "DELETE FROM " . DB_PREFIX . "esselbach_ct_articlespages WHERE articlepage_id = '" . $options[ 1 ] . "'" );

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.