Hidden fields and values when article edited
Opened this issue · 4 comments
Hi,
I have an issue with 1.07 Final.
Members are allowed to publish articles with the module.
I set the default status as "published" (Auto approve submitted articles)
I don't want them to modify the status or to change the author so in permissions, I don't allow this fields for them (Poster name/ Status)
When they add a new article, all is great. The article is published and they are the author.
But when they submit an edit, the article looses his UID (appears as Anonyme) and his status changes to submited...
I would like this fields hidden for them but keeping the actuals values (author + published status)
Is there a quick way to do that?
When the fields are allowed, it works well so I could hide them by some cheat but I would prefer a proper way ^^
Thanks for your help
Hi again,
As I was a little bit in the rush, I used my brain and think I've found something.
As I'm not a dev, I would love you to confirm that I did it right please
So in file publisher\class\item.php
l 1124 to 1126
there was
$this->setVar('uid', Request::getInt('uid', 0, 'POST')); $this->setVar('cancomment', Request::getInt('allowcomments', 1, 'POST')); $this->setVar('status', Request::getInt('status', 1, 'POST'));
I replaced it by
$this->setVar('uid', Request::getInt('uid', $this->getVar('uid'), 'POST')); $this->setVar('cancomment', Request::getInt('allowcomments', 1, 'POST')); $this->setVar('status', Request::getInt('status', $this->getVar('status'), 'POST'));
(I think it will be the same issue with the other fields, it will worth a look)
But when they submit an edit, the article looses his UID (appears as Anonyme) and his status changes to submited...
Hi Hec4,
For your modifications, I did'nt check this, I'm not a developper either but 1 remark :
"his status changes to submited..." it's normal !
Author changed text (or not) so group moderators should check again !
Hi Alain,
as I've said yes to "Auto approve submitted articles", I don't think so ^^
In case I want admin to approve, you're right, my fix will be a problem.
So maybe it's optimisable (but it works in my case, so as I wait for something better, it will does the tricks ^^)
I'm thinking of adding an option for "Default Status of edited article", for when a regular user without the "Status" permission edits an article it would change to that status once its edited. but we probably don't want 'Rejected' and 'Offline' articles to be published without Moderator approval. Maybe its more of a "Default Status for edited published article".
also, if they are a Publisher Moderator or have 'Status' permission then the default will be the current status as they can already change the status to what they want.
Suggestions?