TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,992
  • Total Topics: 21,323
  • Online today: 422
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 409
  • Total: 409

[bug] Delete article category give error

Started by Lesmond, September 09, 2006, 04:05:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bloc

As reported in bugtracker. This is the solution:

Open TPortaladmin.php and find:
        elseif(isset($_GET['featured']) || isset($_GET['artdelete']) || isset($_GET['arton']) || isset($_GET['artoff'])){

replace with:
        elseif(isset($_GET['catdelete']) || isset($_GET['featured']) || isset($_GET['artdelete']) || isset($_GET['arton']) || isset($_GET['artoff'])){


Open up TPortalAdmin.template.php and find:
      <td><a href="' . $scripturl . '?action=tpadmin;catdelete=' .$mg['id']. '" onclick="javascript:return confirm(\''.$txt['tp-confirmcat1'].'  \n'.$txt['tp-confirmcat2'].'\')">

replace with:
      <td><a href="' . $scripturl . '?action=tpadmin;catdelete=' .$mg['id']. ';sesc='.$context['session_id'].'" onclick="javascript:return confirm(\''.$txt['tp-confirmcat1'].'  \n'.$txt['tp-confirmcat2'].'\')">

G6Cad

That is strange, i already had the correct lines in both files  ???

arniece

IMHO there is an error in the first line of code to replace.
You wrote: elseif(isset(isset($_GET['featured']) || isset($_GET['artdelete']) || isset($_GET['arton']) || isset($_GET['artoff'])){
There is a double "isset("!

The right expression to replace should be: elseif(isset($_GET['featured']) || isset($_GET['artdelete']) || isset($_GET['arton']) || isset($_GET['artoff'])){

But bugfix worked fine!

bloc


bloc

Quote from: Mrs G6 on September 09, 2006, 04:12:48 PM
That is strange, i already had the correct lines in both files  ???
Hm, maybe I corrected it earlier and un-corrected it for the beta..? ??? :)

Anyway, good you have it right though. It was many of these links to convert, so one or 2 spots might slipped through.

Blue Steel

???

After replacing those 2 lines it still isn't working ..

now I'm getting

Session verification failed. Please try logging out and back in again, and then try again.

I log out and then i log back in and I still get the same message

Attached are the 2 files plz check and see what I've done wrong :(

arniece

Changes in TPortalAdmin.template.php are alright. :up:

But in TPortalAdmin.php it seems you accidentally deleted one line. - The complete ELSEIF statement should be:
        elseif(isset($_GET['catdelete']) || isset($_GET['featured']) || isset($_GET['artdelete']) || isset($_GET['arton']) || isset($_GET['artoff'])){
             $context['TPortal']['subaction']='articles';
             $tpsub='articles';
        }

(at your files from line 44)

Blue Steel

Ok fixed that now .. and tried again..

I tried deleting a sub catagory and it failed with error msg "Session verification failed. Please try logging out and back in again, and then try again."

but when i tried deleting a parent catagory it worked fine

So it looks like its having probs deleting sub catagories only

Erisa

 TPortalAdmin.template.php

I can't find that file.. Erm.. Where is it located at? Under Sources folder? Coz it is not in there.

G6Cad

In your default themes
Forum/themes/default/ here is the file located

This website is proudly hosted on Crocweb Cloud Website Hosting.