TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: bloc on September 09, 2006, 04:05:27 PM

Title: [bug] Delete article category give error
Post by: bloc on September 09, 2006, 04:05:27 PM
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'].'\')">
Title: Re: [bug] Delete article category give error
Post by: G6Cad on September 09, 2006, 04:12:48 PM
That is strange, i already had the correct lines in both files  ???
Title: Re: [bug] Delete article category give error
Post by: arniece on September 09, 2006, 05:02:12 PM
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!
Title: Re: [bug] Delete article category give error
Post by: bloc on September 09, 2006, 09:54:58 PM
oops. Correcting... :)
Title: Re: [bug] Delete article category give error
Post by: bloc on September 09, 2006, 09:57:03 PM
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.
Title: Re: [bug] Delete article category give error
Post by: Blue Steel on September 10, 2006, 04:39:18 AM
???

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 :(
Title: Re: [bug] Delete article category give error
Post by: arniece on September 10, 2006, 11:05:18 AM
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)
Title: Re: [bug] Delete article category give error
Post by: Blue Steel on September 10, 2006, 04:13:49 PM
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
Title: Re: [bug] Delete article category give error
Post by: Erisa on September 10, 2006, 06:19:50 PM
 TPortalAdmin.template.php

I can't find that file.. Erm.. Where is it located at? Under Sources folder? Coz it is not in there.
Title: Re: [bug] Delete article category give error
Post by: G6Cad on September 10, 2006, 06:21:36 PM
In your default themes
Forum/themes/default/ here is the file located
Title: Re: [bug] Delete article category give error
Post by: Erisa on September 10, 2006, 07:22:35 PM
Well I did what u said.. Didnt work for me.

I came out as this when i tried to delete

http://www.habbo-underworld.com/forum/â€Ã...“â€ËÅ"

Anyway for me, 2 categories could not even be edited. It didnt even appear in the edit list.
Title: Re: [bug] Delete article category give error
Post by: Blue Steel on September 11, 2006, 03:30:28 AM
Arghhhh.... when i deleted the parent Catagory its left the sib catagories in there .. but they don't show up on the catagory admin thingy.. only on the manage articles screen.. they are empty catagories ..
so now how do i get rid of them cleanly and safley

They are no lonker in the lists of catagories to be edited or deleted .. but I can still add articles to them by clicking on their name in the article manager screen .. its like that are there but they arn't .. talk about the twilight zone .. LOL
Title: Re: [bug] Delete article category give error
Post by: arniece on September 11, 2006, 09:41:08 AM
I tried to do the same as BlueSteel in my sandbox installation. Have the same Problems here.

@BlueSteel and Erisa: As long, as this is not fixed, you can delete these categories direct from database. You find them in table smf_tp_variables.
Title: Re: [bug] Delete article category give error
Post by: bloc on September 11, 2006, 05:58:50 PM
lol..that can't continue. i will fix this.
Title: Re: [bug] Delete article category give error
Post by: Porky on September 18, 2006, 05:21:41 AM
I changed the files can someone look at it for me attached files and it didn't work
Title: Re: [bug] Delete article category give error
Post by: pomeid on September 19, 2006, 04:57:23 PM
"TPortalAdmin.php"?

This file isn't in my tp_095beta default directory. I see:

TPdladmin.template.php
TPortal.template.php
TPortalAdmin.template.php

Edit: Uh ok, sorry, now I see it.

Neither solve my "old" problem (http://www.tinyportal.net/smf/index.php?topic=6369.msg52023#msg52023).
Title: Re: [bug] Delete article category give error
Post by: G6Cad on September 19, 2006, 04:58:52 PM
Thats beacuse it's not a "template" file.
Look in yor forum/Sources and you have the file there
Title: Re: [bug] Delete article category give error
Post by: domineaux on October 06, 2006, 06:13:13 PM
It would help a great deal to know which folder you can locate files.  Afterall the fixer knows where he is making those changes.  Finding files, within folders isn't always a quicky.

Here is where they're located ----->

http://Mydomain.com/forums/Sources/TPortaladmin.php

http://Mydomain.com/forums/themes/default/TPortalAdmin.template.php

--------------- Ooops didn't work----------------

I tried the above code chances - got a big error message on TPortaladmin.php when I tried to access the Articles Manager.  I think I'll just wait-a-bit and watch.

I just unzipped and FTP the original files back up from the 0.9.5 TP beta to my site. Everything is back to normal.  No articles category delete, but I deleted the nuisance categories in the MyPHPAdmin directly from MySql DB.

This give me an idea -  why don't you just correct the two files and put them up as attachments on the first posting of this thread. Then we can download them and FTP them to our sites.  This will probably work for about 99.99% of us, unless there is some block/snippet/package that alters those two files you know of.

Thanks
Title: Re: [bug] Delete article category give error
Post by: IchBin on October 07, 2006, 03:44:04 PM
Because there are more fixes than just the ones you see here. Thats why Bloc doesn't release updated files. He releases a whole updated pacakge to keep things organized.
Title: Re: [bug] Delete article category give error
Post by: domineaux on October 07, 2006, 03:56:30 PM
Quote from: IchBinâââ,¬Å¾Ã,¢ on October 07, 2006, 03:44:04 PM
Because there are more fixes than just the ones you see here. Thats why Bloc doesn't release updated files. He releases a whole updated pacakge to keep things organized.

I appreciate your response, but I don't see anything different from what I said.  Maybe a package is "the" answer, but after reading the above postings I'd say applying little tweaks to the code is difficult.  I know it's time consuming answering all the posts about the issue and then responding to people that don't know how to code the issue.

So... I think in a case like this all that is needed is a couple of corrected files and a clear explanation of where they're located.  Then it's a matter of unzipping the file into the proper place.  Voila! it's fixed...then everybody's happy.

I'd be pleased to see a couple of little zip files up on the first thread that we could download right now, and fix the issue of this thread without making code changes ourselves.

Remember the more steps and people involved in a process, the more screwed up it's gonna get. 
Title: Re: [bug] Delete article category give error
Post by: G6Cad on October 07, 2006, 04:06:00 PM
On thing with both Beta and Alpha releases are that they are in testing stages all the time.
Even if Bloc have a "fix" for just that issue you explore in your forum, doesent mean it will be good, One fix can (and often do) lead to another issue, It's like a domino game.
One brick in place, the next falls. And there is no use in posting a fix if the fix just lead you to another error, and perhaps a bigger one.

When Bloc is confident about the fixes, and he sees that the fix dont make any thing else bad, he usually post the fix, or releases an update pack.
Title: Re: [bug] Delete article category give error
Post by: domineaux on October 07, 2006, 06:29:25 PM
I'm cool with that.. MrsG6

You, Ichbin, Bloc and others are doing a great job. I can't tell you how nice it's been to actually make a post on a support board that was answered in a timely basis.

Sorry for going on about it.

Kinda stinks...
Title: Re: [bug] Delete article category give error
Post by: G6Cad on October 07, 2006, 08:09:08 PM
It's ok, Sometimes it can be hard not knowing whats going on behind the curtains, so thats why i explained a bit about it, the work is going on all the time, you just dont see it all as we do :)

Like that image btw  :D
Title: Re: [bug] Delete article category give error
Post by: tekgik on October 22, 2006, 09:43:57 AM
Hi there!

Im having the same problem deleting categories. I followed the instructions above. I stil got an error that say something like "session verification failed...." I also noticed that the delete icon beside the categories are gone. pls see my attached image (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg170.imageshack.us%2Fmy.php%3Fimage%3Dscreenshotmi9.jpg&hash=39b3e0ae2927b0303551eece3ce800a5c972c590)
http://img170.imageshack.us/my.php?image=screenshotmi9.jpg

Any help would greatly be appreciated.

Thanks
Title: Re: [bug] Delete article category give error
Post by: G6Cad on October 22, 2006, 09:59:55 AM
Have you installed the update pack TP V.096 ?
If not, download and install it
Title: Re: [bug] Delete article category give error
Post by: tekgik on October 22, 2006, 05:37:25 PM
It works now. Thanks   :up: ;)
Title: Re: [bug] Delete article category give error
Post by: car on November 25, 2006, 09:25:12 AM
Quote from: BlueSteel on September 10, 2006, 04:13:49 PM
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."
I'v same problem.
The problem was that i don't switch to default theme and after delete a subcategory.
In alternative you can apply the modify at TPortalAdmin.template.php of your theme.

SRY FOR MY POOR ENGLISH!