Using the latest dev release as of today ..

The block.skinr.inc and other *.skinr.inc files are not being included in the skinr/modules/ directory.

It seems that this function is empty:

skinr_get_module_apis()

This is also empty:

print_r(module_implements('skinr_api'));

Seems like an odd problem to have .. main skinr.handler.inc seems to be included, but it's not picking up the others. It's not even trying ..

Could be related to PHP version?

PHP 5.2.14-0.dotdeb.0 with Suhosin-Patch 0.9.7

Comments

ericduran’s picture

investigating.

ericduran’s picture

Hi,
So I looked into it. I didn't have a problem. I check in multiple places and skinr_get_module_apis always returns the expected result. Can you be more specific as to where you're calling print_r(module_implements('skinr_api')); from?

By default this isn't going to print anything because all of skinrs skinr_api files are only loading on hook_init which isn't call when is cache and it also has some measure in order to prevent it from running twice.

If you really want to get something from module_implement('skinr_api') you're going to have to call

module_load_include('inc', 'skinr', 'skinr.handlers');
skinr_module_include('skinr.inc');

and then call module_implements('skinr_api').

jason.fisher’s picture

Sorry -- I am dumping the variables right where they are used/expected .. i.e. in the function where they should be set.

e.g., right above a foreach(module_implements('skinr_api') as ..) { ..

I will investigate further when I get a few minutes to break away .. something is keeping the modules/*.skinr.inc files from being included. Adding a bunch of require_once() to include them all manually above the function that should be including them dynamically corrects the issue.

It seems like it is including the handler, and the handler is defining the block_skinr_api function (for example), and that seems like it tells skinr to look for .skinr.inc files for modules implementing hook_skinr_api. But module_implements('skinr_api') is not recognizing the _skinr_api functions defined in the main handler. Maybe the way the handler is being included is causing it..

It feels like a PHP/APC/OS issue for some reason .. like a PHP inheritance/include/require bug. I will be deploying this system onto a staging server soon with a newer PHP, and then will come back and let you know what I find out.

Sorry for the jumbled convo .. stream of consciousness dump while my mind is in code land == poor English. ;)

Jacine’s picture

Status: Active » Postponed (maintainer needs more info)

Not sure what's going on with this, and if there is an actual bug or not.