Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Bug? Or am I too stupid? Modules does not work on the 8th and 9th

Bug? Or am I too stupid? Modules does not work on the 8th and 9th

The module works fine. I set it to MM_DAY_OF_MONTH - and really every day of month it shows another module -

Only on the 8th and on the 9th of any month its refusing cooperation - nothing shows up.

I really dont know how to solve this problem...

mr.mauscat
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Bug? Or am I too stupid? Modules does not work on the 8th and 9th

I think I can have a guess at this...

When you compare the MM_DAY_OF_MONTH to a number, you must NOT use the leading 0. PHP interprets any numbers with a leading 0 as octal (base 8) numbers.

That's fine for 00 to 07 which are the same number in decimal. But 08 and 09 don't exist in octal, so PHP treats them as being 0. From 10 and up you are fine again as there's no leading 0 and PHP treats them as normal base 10.

So you're not stupid - I remember when I first noticed this behaviour too as it was a surprise to me.

Just use something like:

if (MM_DAY_OF_MONTH == 8) .....

... instead of 08.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Re: Bug? Or am I too stupid? Modules does not work on the 8th and 9th

Thanks a lot, that solved my problems!

mr.mauscat
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Bug? Or am I too stupid? Modules does not work on the 8th and 9th

HAHAHA..I think many of us encountered this problem, thanks to metamodeguy..

jayfordroland
Beginner Modder
ranks
useravatar
Offline
3 Posts
User info in posts
Administrator has disabled public posting

Re: Bug? Or am I too stupid? Modules does not work on the 8th and 9th

Can you please post the code you are using?

Thanks,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10746
Newest User:
victor1234
Members Online:
0
Guests Online:
212

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked