Forums

Watchman Issues

NightFox 15 Apr, 2009
Hi there,

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
GreyHead 15 Apr, 2009
Hi 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
GreyHead 16 Apr, 2009
Hi NightFox,

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
NightFox 16 Apr, 2009
I'm running 5.2.9-1, i don't know if this is the latest version or not
GreyHead 16 Apr, 2009
Hi NightFox,

OK, thanks. The big changes were between versions 4 & 5 so that theory goes out of the window. I'll keep digging.

Bob
hillhounds 29 Apr, 2009
Did you ever figure this out? I'm having the exact same issue. I'm running Joomla 1.5.6, PHP 5.0.67 and Chronoforms 3.1 RC 4.11.

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: 
GreyHead 30 Apr, 2009
Hi both,

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
hillhounds 11 May, 2009
FYI... I figured out that a workaround for now is to install an access control component, which can make it so that non-registered users not only don't see the form in the menu... but they also can't access it, even if someone gave them the direct link. There are a variety of them in the Joomla Extensions Directory.

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=).
GreyHead 11 May, 2009
Hi hillhounds,

The updated version of Watchman is in the RC5.0 ChronoForms release.

Bob
Bullfn33 30 Aug, 2009
I'm getting no display of the redirect message for the Users tab of this plugin. I have it set to redirect public users. It redirects to the correct page but no message. I also have a redirect and message if the form is closed on the Dates and Times tab and it does display the message on that redirect. I'm using CF v3.1 RC5.5. Below is the debug.

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.

GreyHead 13 Sep, 2009
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
Bullfn33 16 Sep, 2009

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.
GreyHead 16 Sep, 2009
Hi bullfn33,

:-( sorry, I'll look again in the morning, it's midnight here.

Bob
Bullfn33 16 Sep, 2009
hey, no problem..thanks for the quick reply and taking the time to look!
GreyHead 17 Sep, 2009
Hi Bullfn33,

I found another little typo :-(

Please check the attached version

Bob
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger