Hello miccet,
I found what looks like to be a fix (already submitted to alex) but you might rush and try for yourself.
add this code:
} elseif (isset($pageParams->query_vars['pagename'])) {
$postId = url_to_postid($pageParams->query_vars['pagename']);
$object = get_post($postId);
$objectType = $object->post_type;
$objectId = $object->ID;
}
as another elseif of the block you said in your post.
file:
user-access-manager/class/UserAccessManager.class.php
function:
public function redirect($headers, $pageParams)
near line 1977 (another else if block there)
Regards
Thread Starter
miccet
(@miccet)
Hi marlus,
Thanks for looking into the issue. I put in the code in the right place but it’s still not redirecting to the page I specified in the settings of UAM. When I put it back to ‘default’ permalinks it works again. I think I’m gonna have to use a debugger to see what’s really going on in there. I will keep following the thread and post whatever I find.
Cheers
Hi Miccet and Marlus
I like that plugin and already installed it on several websites, so thank you for this!
But I have the same type of problem:
When I set the plugin to redirect to a specific page of the website, it doesn’t work.
Hopefully I didn’t do anything wrong and the problem is somewhere else…
In advance thank you for your help on that one
Just a quick heads up that the code Marlus provided fixed this problem for me. Good work Marlus, and thanks!
Unfortunately I seem to be having the same problem as Miccet – UAM won’t redirect to the page specified in the UAM settings. I have added Marlus’s code snippet to the ‘public function redirect’ on line 1977 but the behaviour hasn’t changed. 🙁
The new code looks like this, which seems correct to me?
[Code moderated as per the Forum Rules. Please use the pastebin]
Okay here’s a second attempt at the code! 🙂
http://pastebin.com/hE4p8qcL