Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden fields and values when article edited #163

Open
Hec4 opened this issue Apr 16, 2021 · 4 comments
Open

Hidden fields and values when article edited #163

Hec4 opened this issue Apr 16, 2021 · 4 comments

Comments

@Hec4
Copy link

Hec4 commented Apr 16, 2021

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

@Hec4
Copy link
Author

Hec4 commented Apr 16, 2021

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)

@alain01
Copy link

alain01 commented Apr 16, 2021

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 !

@Hec4
Copy link
Author

Hec4 commented Apr 16, 2021

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 ^^)

@ihackcode
Copy link
Contributor

ihackcode commented Oct 28, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants