Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - Version 4.3

[eluser]Daeli[/eluser]
Hello - a little problem here.

When i try to load a library wich is in the application/libraries folder from a module i get a white page and a PHP error in my error.log:

Code:
[Wed Mar 26 16:37:09 2008] [error] [client 127.0.0.1] PHP Fatal error:  Class 'CI_Diagramlib' not found in C:\\workspace\\project\\system\\application\\libraries\\modular_extensions.php on line 255

My library is named "diagramlib".

PHP v5.2.5
Apache 2.0.x

[eluser]badgeek[/eluser]
hello, just trying validation with module, but i cant get custom callback function to work, is there any way to do it?

thanks

[eluser]wiredesignz[/eluser]
@badgeek, Unfortunately CI validation callback functions are expected to be located in the controller.

I have a MY_Validation extension which allows callbacks into Models or Modules.

It's on the wiki if you'd like to try it:
http://codeigniter.com/wiki/MY_Validatio...to_Models/

[eluser]wiredesignz[/eluser]
[quote author="Daeli" date="1206564700"]Hello - a little problem here.

When i try to load a library wich is in the application/libraries folder from a module i get a white page and a PHP error in my error.log:

My library is named "diagramlib".[/quote]

The CI_ prefix is for core classes, try renaming the class to match the ucfirst(filename).

Make sure you are using Version 4.0.23 also. Thanks

[eluser]Daeli[/eluser]
Hmm i'am using 4.0.23 - but i'll try that. Thanks.

[eluser]Daeli[/eluser]
Didn't have any effect.

[eluser]wiredesignz[/eluser]
@Daeli, Check for duplicate library filenames within the module directory because an error at line 255 suggests the loader has found a module library file but doesn't have the correct class name.

You could try ucfirst filename ie: Diagramlib.php and see if that works, failing that post your library code and the module from which it is loaded.

I found a seperate bug in the loader which I will correct in 4.0.24, but if you could post your findings here I will be able to fix both at once. Thanks.

[eluser]Daeli[/eluser]
Hi again,

the library i want to use is stored under "/system/application/libraries/graph.php" (classname: "graph")

The Module is located under "/system/application/modules/graphs/graphs.php".

Within the module i tried to load the library with:
Code:
$this->load->library('graph');

Folder structure

*EDIT*
Error message:
Code:
Fatal error: Class 'CI_Graph' not found in C:\workspace\simceo\system\application\libraries\modular_extensions.php on line 255

[eluser]wiredesignz[/eluser]
Version 4.0.24 is available on the wiki
Corrected library loader problem. Thanks Daeli. Wink

[eluser]Daeli[/eluser]
Thanks alot for the new version Smile

*edit* Works perfectly.




Theme © iAndrew 2016 - Forum software by © MyBB