Closed (fixed)
Project:
OG User Roles
Version:
5.x-3.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 May 2008 at 20:54 UTC
Updated:
9 Jun 2008 at 18:04 UTC
Jump to comment: Most recent file
Comments
Comment #1
somebodysysop commentedDo not have prepopulate or use it, so you'll need to describe what *should* happen and what *does* happen. Please include URL examples. Might be easily fixable.
Comment #2
markfoodyburton commentedHi,
Thanks for the fast reply
I dont mind doing a little fixing - seems from your pages that editablefields needs fixing too - so I can do that one (It's one of mine)... but - I might need some guidance.
It _may_ be easier to have an IRC or IM session for me to show you the problem - For a start, I'm happy to enable the module on the live site, but it breaks some things, so I have not left it enabled....
basically I have a link on a page that sends the user to
/node/add/&...prepopulate commands.
e.g.
/node/add/forum&gids%5B%5D=1884&edit%5Bfield_category%5D%5Bkey%5D=bug%20report&edit%5Bfield_status%5D%5Bkey%5D=active
When you go there, what happens is that all the prepopulate commands seem to have been "eaten", you end up at a URL without them in place - so presumably the prepopulate module doesn't operate on them...
Here's my guess -
1) need to make prepopulate execute after og user roles (My GUESS is that it's operating before ogur and it's eating the commands itself... possibly pre-filling in a form that is then abandoned as ogur redirects the input to another page???)
2) need to make prepopulate work on /ognodeadd not just /node/add
I think (2) is the case for the forum's module too - so it picks up it's gid[]=....
Right now, the gid[] is still on the URL when you "arrive", but the forum module (which normally uses this to work out which forum this post is in) doesn't seem to respond to it, maybe because we're not on an /node/add page any more?
I haven't had time to test all this out yet - and I suspect that I'll be very wrong about most things :-)
Cheers
Mark.
Comment #3
somebodysysop commentedIf you have skype, let me know and I can send you my address.
My guess is a patch to prepopulate to use node/ 'add' OR 'ognodeadd' might fix it quickly.
The other thing is to see if it's fixable on the OGR side. Have done it with other modules such as modr8 and book:
In either case, need to know what prepopulate is looking for.
I don't have the module. But, will look at the code.
Comment #4
markfoodyburton commentedThanks for your reply...
I'll get in touch, and try out what you suggest :-)
Cheers
Mark.
Comment #5
somebodysysop commentedTry this patch. What it does is include whatever is in the original query string as it's passed to ognodeadd. This theoretically should resolve the issue, but needs to be tested.
Apply this patch to clean download of 3.1 release.
Let me know how it works.
Comment #6
markfoodyburton commentedTHANKS !!
I'll give it a go right away!
Comment #7
markfoodyburton commentedSo - it fixes one bug, but I think it create another
I still need to work out why the /node/add/forum?gids[]=XYZ isn't working... but one thing at once :-)
This patch made it so that prepopulate commands work...
top banana :-)
However, if you have a "simple" add link (like those on the group "block")
/node/add/book?gids[]=1016
you end up generating a URL that looks like....
/en/node/ognodeadd?type=release&gids[]=1016&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/ognodeadd&type=release&q=en/node/add/release
this grows and grows until the browser gives up.
I will try and debug this further...
Comment #8
somebodysysop commentedThe code was actually written to deal with this:
But not this:
So, try the attached patch to see if it solves the new issue. Again, to be patched against clean 3.1 download.
Comment #9
markfoodyburton commentedThis is really close now
THANKYOU so much for the hard work (at both ends of the day!)
I think there are two minor problems left.
In a group page, for some reason, I have a "create content" link - if you hit that, you get the recursive redirect.
I dont mind getting rid of that link, but it seems to be a "feature" I can't remove?
Then I need to work on the forums module to sort our looking for the guid[]=... thing...
THANKS AGAIN!
Cheers
Mark.
Comment #10
somebodysysop commentedOK, then, try this. It's going to print the query at the top of the page, but that's just for debugging.
Comment #11
markfoodyburton commentedYes, that works :-)
Thanks!
one down, a small one to go :-)
Cheers
Mark.
Comment #12
somebodysysop commentedComment #13
somebodysysop commentedYet another patch. Hopefully this takes care of:
/node/add/forum/38
Comment #14
markfoodyburton commentedThis works
THANKS!
On the other issue: of passing the forum gid to the /node/add/forum.
A link like this is "legal' with the og_forums module:
/node/add/forum?gids[]=1234
However, this wont work (for some reason) with og_user_roles.
However, with this patch, you can now use
/node/add/forum/TID
(Converting the GID to the TID is left to the interested reader)
THANKS SomebodySysop
Comment #15
somebodysysop commentedPerhaps we're not talking about the same thing. From the OG Create Forum topic link:
This is what OGR has always used to create forum topics. It translates it to:
then processes. The og_forum module was modified some time ago to accept this URL format.
How, exactly, is it NOT working for you?
Comment #16
markfoodyburton commentedthis is exactly what I was trying.
Strangely - for me - it didn't work. However, if I use
(Where 1234 is the taxonomy ID of the forum that I want to add to, rather than the group ID of the group containing the forum I want to post to (to the default forum in that group))
Then it works....
I have the links embedded in, for instance, the footer of a view, so it isn't so hard to change the php code to accommodate (which is what I have done), so for me, this is no longer a big problem, though it would be nice to get to the bottom of it...
Comment #17
somebodysysop commentedBelieve this is fixed. Will be included in 3.2 release.
Comment #18
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.