Before i start i'd like to say how great this module is, it's saved me loads of hassle and makes the site run more smoothely.
I'm having some issues with setting up watchman, i'd like to only allow certain user groups to access my form.
I have selected the groups i'd like to allow and clicked save, and i've enabled the plugin in the form.
However when i visit the page with a user that has the correct priviledges it just redirects me to my homepage, this also occuers for those users without the priviledges.
I have turned on debug for watchman and these are the errors i am recieveing when i access the page (as administrator with correct permissions):
Params: stdClass Object ( [redirect_url] => [gid] => Array ( [0] => 19 [1] => 20 [2] => 23 [3] => 24 [4] => 25 ) [redirect_message_users] => Sorry you don't have access to this resource! [open] => [redirect_message_open] => [close] => [redirect_message_close] => [redirect_message_days] => [open_time] => 00:00 [redirect_message_open_time] => [close_time] => 00:00 [redirect_message_close_time] => [debug] => 1 )
Notice: Undefined property: stdClass::$users in C:\wamp\www\components\com_chronocontact\plugins\cf_watchman.php on line 295
Redirecting Now !!!! to index.php with message:
Redirecting Now !!!! to index.php with message:
Notice: Undefined property: stdClass::$days in C:\wamp\www\components\com_chronocontact\plugins\cf_watchman.php on line 271
Warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\wamp\www\components\com_chronocontact\plugins\cf_watchman.php on line 271
Notice: Undefined property: stdClass::$days in C:\wamp\www\components\com_chronocontact\plugins\cf_watchman.php on line 295
Redirecting Now !!!! to index.php with message:
Redirecting Now !!!! to index.php with message:
Does anyone know how to stop it redirecting when the correct user is logged in?
Regards
NightFox
I'll take a look first thing in the morning. It looks like we have a little mismatch between my code written for RC3 and the changes Max has made in RC4. Apologies.
Bob
A thought just crossed my mind - are you using PHP4 or 5?
I can't replicate the errors you are seeing but it could be that you are on PHP 4 and the code uses some 'PHP5 only' functions.
Bob
OK, thanks. The big changes were between versions 4 & 5 so that theory goes out of the window. I'll keep digging.
Bob
Also, in case it's helpful to know, though it redirects whether I'm logged in as the appropriate level of user or not, it doesn't display the redirect message.
This is the error I get on the Watchman Configuration page:
Params: stdClass Object ( [redirect_url] => index.php?option=com_comprofiler&task=registers [gid] => 18 [redirect_message_users] => This survey is only open to registered HillHounds.com users. [open] => [redirect_message_open] => [close] => [redirect_message_close] => [redirect_message_days] => [open_time] => 00:00 [redirect_message_open_time] => [close_time] => 00:00 [redirect_message_close_time] => [debug] => 1 [days] => 1|2|3|4|5|6|0 )
days_array: Array ( [1] => stdClass Object ( [value] => Monday [text] => Monday [disable] => ) [2] => stdClass Object ( [value] => Tuesday [text] => Tuesday [disable] => ) [3] => stdClass Object ( [value] => Wednesday [text] => Wednesday [disable] => ) [4] => stdClass Object ( [value] => Thursday [text] => Thursday [disable] => ) [5] => stdClass Object ( [value] => Friday [text] => Friday [disable] => ) [6] => stdClass Object ( [value] => Saturday [text] => Saturday [disable] => ) [0] => stdClass Object ( [value] => Sunday [text] => Sunday [disable] => ) )
And this is the error I get on the redirect page:
Params: stdClass Object ( [redirect_url] => index.php?option=com_comprofiler&task=registers [gid] => 18 [redirect_message_users] => This survey is only open to registered HillHounds.com users. [open] => [redirect_message_open] => [close] => [redirect_message_close] => [redirect_message_days] => [open_time] => 00:00 [redirect_message_open_time] => [close_time] => 00:00 [redirect_message_close_time] => [debug] => 1 )
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/hillh3/public_html/content/components/com_chronocontact/plugins/cf_watchman.php on line 258
Redirecting Now !!!! to index.php?option=com_comprofiler&task=registers with message:
Redirecting Now !!!! to index.php?option=com_comprofiler&task=registers with message:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/hillh3/public_html/content/components/com_chronocontact/plugins/cf_watchman.php on line 271
Redirecting Now !!!! to index.php?option=com_comprofiler&task=registers with message:
Redirecting Now !!!! to index.php?option=com_comprofiler&task=registers with message:
There were some quite big bugs when items don't have values set. I think I've ironed all of those out for the next release of ChronoForms.
Bob
http://extensions.joomla.org/extensions/access-&-security/backend-&-full-access-control
If you use one of those components, you have to make sure that you only give out the menu link (e.g. /index.php?option=com_chronocontact&Itemid=), not the link that's shown in the Chrono Forms dashboard (e.g. /index.php?option=com_chronocontact&chronoformname=).
The updated version of Watchman is in the RC5.0 ChronoForms release.
Bob
Debug information
Params: JParameter Object ( [_raw] => redirect_url=/contests/conference-challenges debug=1 gid=18|19|20|21|30|23|24|25 redirect_message_users=You must be logged-in to enter this contest. Please login or register at the top right of the page. redirect_message_open=Sorry, the contest you tried to access is not yet open for entry. Please try again later. close=29-08-2009 21:14 redirect_message_close=Sorry, the contest you tried to access is closed for the week. Please try again next week. days=1|2|3|4|5|6|0 open_time=00:00 close_time=00:00 [_xml] => [_elements] => Array ( ) [_elementPath] => Array ( [0] => /home/xxxxxxxx/public_html/libraries/joomla/html/parameter/element ) [_defaultNameSpace] => _default [_registry] => Array ( [_default] => Array ( [data] => stdClass Object ( [redirect_url] => /contests/conference-challenges [debug] => 1 [gid] => Array ( [0] => 18 [1] => 19 [2] => 20 [3] => 21 [4] => 30 [5] => 23 [6] => 24 [7] => 25 ) [redirect_message_users] => You must be logged-in to enter this contest. Please login or register at the top right of the page. [redirect_message_open] => Sorry, the contest you tried to access is not yet open for entry. Please try again later. [close] => 29-08-2009 21:14 [redirect_message_close] => Sorry, the contest you tried to access is closed for the week. Please try again next week. [days] => Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 0 ) [open_time] => 00:00 [close_time] => 00:00 ) ) ) [_errors] => Array ( ) )
User groups (18, 19, 20, 21, 30, 23, 24, 25 [user: guest])
Redirecting Now !!!! to ('redirect_url') with message:
Close date (29-08-2009 21:14)
Redirecting Now !!!! to ('redirect_url') with message: Sorry, the contest you tried to access is closed for the week. Please try again next week.
Apologies, I found a bug in there. Modified version attached, unzip and copy the cf_watchman.php file to the com_chronocontact/plugins folder.
NB You will need to re-configure the group permissions after the change so please make a note beforehand.
Bob
Hi Bullfn33,
Apologies, I found a bug in there. Modified version attached, unzip and copy the cf_watchman.php file to the com_chronocontact/plugins folder.
NB You will need to re-configure the group permissions after the change so please make a note beforehand.
Bob
I downloaded the above file and uploaded it. The message is displaying fine but now it is redirecting all users to login even though they are already logged in and have access to the form.
:-( sorry, I'll look again in the morning, it's midnight here.
Bob