https://www.icyphoenix.com/viewtopic.php?f=35&t=804
-----------------------------------
Daggers
Mon 08 Jan, 2007 21:21

SOLVED BOTH BUGS Just Another Bug Or Two
-----------------------------------
Forget this bit, I have solved it, but the second part of the question still needs addressing.

[quote]Hi there again just found this one when trying to access  the home page;

[quote]You are not authorized to view this page.[/quote]

This only happens on the home page, all other pages are acessable.[/quote]

The second bug that as now appeared is at the top of every page and reads as follows;

[quote]Warning: sprintf() [function.sprintf]: Too few arguments in /homepages/8/d69702653/htdocs/includes/page_header.php on line 1000[/quote]

Hope these can help you with debugging, if I can help in any way let me know.

A test account as been created for anybody who wishes to have a look, username is Test and the password is Test.

Site is here http://www.steve-daggers.co.uk


-----------------------------------
Daggers
Mon 08 Jan, 2007 22:43

Re: Just Another Bug Or Two
-----------------------------------
Forget the authorisation error I have sorted that one out, I just needed to reset all my page permissions back to all, and then back to my prefered settings to clear the bug.


-----------------------------------
tiolalu
Tue 09 Jan, 2007 11:27

Re: [Solved] Just Another Bug Or Two
-----------------------------------
Put SOLVED on the subject of the first post ;) .


-----------------------------------
Daggers
Tue 09 Jan, 2007 20:50

Re: Just Another Bug Or Two
-----------------------------------
Only the first part of the question has been solved the bit regarding aurthorisation, the second part of the question still needs to be addressed.


-----------------------------------
Daggers
Tue 09 Jan, 2007 21:33

Re: Just Another Bug Or Two
-----------------------------------
[quote]Warning: sprintf() [function.sprintf]: Too few arguments in /homepages/8/d69702653/htdocs/includes/page_header.php on line 1000[/quote]

Ok I have found what is causing this error and it is quite easy to rectify.

To prevent this error from appearing goto ACP - CrackerTracker - Settings - Check Password, go down to the option for "Password Validity" and deactivate this option, this stops the error message from being displayed at the top of the page above Page Header.


-----------------------------------
Mighty Gorgon
Wed 10 Jan, 2007 01:30

Re: SOLVED BOTH BUGS Just Another Bug Or Two
-----------------------------------
[quote user="Daggers" post="6700"][quote]Warning: sprintf() [function.sprintf]: Too few arguments in /homepages/8/d69702653/htdocs/includes/page_header.php on line 1000[/quote]

Ok I have found what is causing this error and it is quite easy to rectify.

To prevent this error from appearing goto ACP - CrackerTracker - Settings - Check Password, go down to the option for "Password Validity" and deactivate this option, this stops the error message from being displayed at the top of the page above Page Header.[/quote]
Mmmm... that is strange... you shouldn't get that error anyway... :roll:

This needs some more testing, because it could be a bug... I'll have a try tomorrow.

This is row 1000:
[codeblock]			'L_MESSAGE_TEXT' => sprintf($lang['ctracker_info_pw_expired'], $ctracker_config->settings['pw_validity']),[/codeblock]
and the error states that we are missing an argument...


-----------------------------------
Mighty Gorgon
Wed 10 Jan, 2007 01:31

Re: SOLVED BOTH BUGS Just Another Bug Or Two
-----------------------------------
In fact it is a bug... the lang var requires two arguments, while the page_header is just passing one to it...

I'm going to fix this.

Thanks! :wink:


-----------------------------------
Mighty Gorgon
Wed 10 Jan, 2007 01:35

Re: SOLVED BOTH BUGS Just Another Bug Or Two
-----------------------------------
Ok... the bug should be fixed with this:

OPEN [b]includes/page_header.php[/b]
FIND
[codeblock]			'L_MESSAGE_TEXT' => sprintf($lang['ctracker_info_pw_expired'], $ctracker_config->settings['pw_validity']),[/codeblock]
REPLACE WITH
[codeblock]			'L_MESSAGE_TEXT' => sprintf($lang['ctracker_info_pw_expired'], $ctracker_config->settings['pw_validity'], $userdata['user_id']),[/codeblock]

Let me know if it works... :wink:


-----------------------------------
Daggers
Wed 10 Jan, 2007 19:55

Re: SOLVED BOTH BUGS Just Another Bug Or Two
-----------------------------------
Thanks MG, that solved the problem the error has now disappeared from the top of the page header when I switch password checking back on, also the correct info box appears on portal body with the message;

The administrator has made adjustments so that a password may be valid only for 30 days. days. We recommend for safety reasons that you change your password now. (Profile)

Thats some more bugs fixed hooraah.


-----------------------------------
Mighty Gorgon
Thu 11 Jan, 2007 02:18

Re: SOLVED BOTH BUGS Just Another Bug Or Two
-----------------------------------
[quote user="Daggers" post="6916"]Thats some more bugs fixed hooraah.[/quote]
Great! :lol:


