Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.7 developers
jimport('joomla.access.rules);
in your code in 1.6/1.7 to be able to access that class. Add that in
and see if it works.
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.7 developers
After a month or two, developers can safely change to using
JAccessRule/s directly and the auto-loader will pick it up. The
awkward period is where they want to support 1.7 and 2.5 at the same
time, which is reasonable to do for a while. The workaround is simply
to add the jimport call into the custom extension which will work for
both 1.7 and 2.5.
I guess the CMS could add it in, and since the rules are so common
(virtually every page load will use the class), I'd just add it to the
jimport to the framework.php files. That's a less painful approach
for the developer but it's a bit like using the @ symbol to hide
errors.
Either approach works but I think the first is better.
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.7 developers
@Tom, in the mean time, just add the jimport to your component and
everything should work file in 1.7 and 2.5 betas.
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.7 developers
This fix is only at the CMS level but the platform could pick it up.
Rouven
@Tom, try this in your extension until a patched beta comes out:
JLoader::register('JRules', JPATH_PLATFORM . '/joomla/access/rules.php');
JLoader::register('JRule', JPATH_PLATFORM . '/joomla/access/rule.php');
I think I got that right.
@Rouven, thanks for the patch (minor typo in it).
@Elin, I don't necessarily disagree with you, but neither do I
disagree with the autoloader change so, for me, it's less effort for
the major downstream users of the platform (Joomla CMS, maybe Molajo,
although they had a hang-up with JRules and might have thrown it out,
and possibly Square One falls into that category) to add the 2-line
workaround given 11.4 has bolted and the master branch is tainted and
the nett benefit to developers outweighs the inconvenience (my opinion
and I don't really mind if you disagree with that position). Note,
this paragraph is also longer than the actual "fix" :)
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.7 developers