TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: Freddy on May 28, 2009, 12:25:24 PM

Title: [bugtracker] Admin cannot edit user submitted articles.
Post by: Freddy on May 28, 2009, 12:25:24 PM
Firstly the user submits the article (in this case HTML).  Then
as Admin I approve it and assign it to a category.  All well
and good.  Now however when I try as Admin to edit the
article, the body and intro text-boxes are not visible like they
are for Admin created articles.

The article does display correctly in the main forum, but as
for editing it as an admin it's not working.

Link to my site: offline work using Abyss webserver
SMF version: 1.1.9
TP version: v1.0 beta 4
Theme name and version: Default
Browser Name and Version: Firefox 3, Chrome
Mods installed: None
Related Error messages: n/a
Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: tupsi on May 28, 2009, 02:35:06 PM
I had something similiar until I realised I used the wrong method (some ancient pre 1.0 one) to call for a new article.
Check if your url you are using to create the new article says "submitarticle" (old version), or if it says "addarticle" (new version) at the end.

Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: Freddy on May 28, 2009, 02:43:24 PM
I'm not using custom methods, just those provided 'as is' sooo...

The user clicks on 'Write HTML Article' from their User pane and the url from that is :

http://localhost/forum1/index.php?action=tpmod;sa=submitarticle

If I change it to sa=addarticle I get an error :

Unable to load the 'main' template.
Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: tupsi on May 28, 2009, 03:17:30 PM
hmm interesting, I never had that "write html article" in my user pane. The action changed as well, so the correct url you should try is:

index.php?action=tpadmin;sa=addarticle

instead of the old

index.php?action=tpmod;sa=submitarticle

also I noticed that they now get access to the link via the admin menu with only the respective settings avaiable.

Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: Freddy on May 28, 2009, 03:26:10 PM
Hmm, well for that to work I found I have to also allow the member to Manage Articles otherwise you get the error :

Sorry, you aren't allowed to manage articles.

It does seem to work properly this way, but what if I don't want to give a member permission to manage articles ?  For that it's not going to work still.

Personally I don't think this is a case of 'old and new' methods - Bloc seems to have designed it this way to differentiate between article management and simple article submission.
Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: Petee on May 28, 2009, 09:28:30 PM
I am unable to duplicate this bug using 3 different sites with the same versions.  Admins are able to edit user submitted articles just fine.
Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: G6Cad on May 28, 2009, 10:10:33 PM
Same for me, works on 3 diffrent servers and my local testsite to
Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: Freddy on May 29, 2009, 12:41:45 PM
Quite possibly, but is this because you had the Manage Articles permission set for the test user when submitting the article ?

By which I mean if the user has permission to manage articles then I can edit the article.

But if the user only has permission to submit articles (eg HTML) then when that gets submitted I am unable to edit the article.
Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: Petee on May 29, 2009, 03:58:57 PM
No, I do not let my users manage articles. I have it set up to where anyone that registers on my site can submit an article. They can not manage them or edit them after submitted. Admins are able to go in and edit them with no problem.
Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: Freddy on May 29, 2009, 05:00:29 PM
Weird, I'm going to try a fresh install, but someone else had the same problem and they found a workaround :

http://www.tinyportal.net/index.php/topic,29793.msg237542.html#msg237542
Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: Freddy on May 31, 2009, 08:08:30 PM
Well I think I found a fix for this :

http://www.tinyportal.net/index.php/topic,29781.msg237655.html#msg237655

I can't understand why it works for some people and not others, especially now I took a look at the code.  :uglystupid2:
Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: bloc on October 09, 2009, 11:58:48 AM
Fixed for TP 1.0 beta 5.
Title: Re: [bugtracker] Admin cannot edit user submitted articles.
Post by: Freddy on October 09, 2009, 01:15:45 PM
Great, that one really bugged me lol  ;D