I'm trying to use discussthis to automate the posting of events on a forum.
I'm using Forum Access in D5 legacy mode, so "new posts" and "comments" aren't related permission wise.

I figured I'd make a specific user which has moderator rights in the forum (so he can start new topics/posts) and using that account as the author for everything created by discussthis.. however this does not work:

[code]
* An illegal choice has been detected. Please contact the site administrator.
* Forum post could not be created for your comment to be published.
[/code]

I'm not sure if this is an issue or by design.

Thanks.

Comments

AlexisWilke’s picture

rv0,

Hmm... Who's posting the comment? An anonymous user? They should have right to post comments if so. Also the moderator should have rights to post comments as far as I recall.

I suppose that the Forum Access system may be a problem too...

Thank you.
Alexis

rv0’s picture

The problem here is not posting of comments, that works just fine.
I'm talking about a method of starting new topics in a forum where starting a new topic isn't allowed by regular users.

i'll try to explain better:

Anonymous & authenticated users can submit "things".

Authenticated users can comment on them using Discuss This which creates a new post in the forum.

I already configured it so that authenticated users can comment and not start new topic. (using D5 legacy mode provided by Forum Access)

So nobody except moderator are allowed to make new posts (= topics) in the forum.
then I configured the Discuss This "Post settings for new topics" to use a moderator account as "Author of newly created Forum discussions"

I figured this would work, but it doesn't, giving the error above about "illegal choice".. Am I overlooking something? I'm only guessing.

Thanks

unrelated:
I noticed there's a long list of tokens, but there appears to be no token for the author of the node being commented. That would be a useful feature.

sellsjello’s picture

I'm having same issue. I'm using Forum Access in D5 legacy mode, and trying to use a Moderator to post a new topic.

Any updates?

Thanks,
Julian

AlexisWilke’s picture

Hmmm....

I understand the problem. The thing is that when the post is created, it can only be created with either the anonymous user (which is what is done now) or the currently logged in users. There is only one exception: if the user who is logged in is the Administrator (UID 1) or someone with pretty high administration rights (not sure which one exactly...) then any user can be assigned as the post author.

The problem is that if the post is created "by hand" we're very likely to miss all sorts of things added by other modules (such as CCK that adds fields to nodes, not like you're using that specifically, but many modules do that... i.e. taxonomy is another one that comes to mind.) The result, when such fields are missing, is even worse that what you describe.

Now, I had a thought the other day that I could eventually look into (1) save the current user state, (2) log in as Admin, (3) save the new post as whatever author you selected, (4) restore the "current" user state.

My concern is that I'm not so sure we can easily restore the user state. But I have not looked closely. It think it would be possible to force a form of log out, then log in as admin, log out the admin, and log the user back in as done on load. This uses $_COOKIEs though... It probably won't be straight forward.

Thank you.
Alexis Wilke

rv0’s picture

just a small follow up as this is still active: I'm not using discuss this anymore for my usecase.

Using the Rules module instead with little custom code.

AlexisWilke’s picture

rv0,

Can you, with the Rules module, create a forum post with anyone as the author?

Thank you.
Alexis

rv0’s picture

I'm not sure how exactly it's working now, it's been a while,

but in the rules module, you can
"Load a user account" and assign it to a temp variable
there's also a "Set the content author" action where you can use that temp user variable.

that should do it i guess.

AlexisWilke’s picture

I should probably have a look to see how they create said content... They may have a better way that works and somehow bypasses the permissions.

dom.’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Module maintainer has changed. I'm closing this issue after years of inactivity, please open a new issue if needed.