CRI: unable to retrieve quota settings for module: myModule

Developer Networks
Developer Networks
@developer-networks
5 years ago
566 posts
<?php
// make sure we are not being called directly
defined('APP_DIR') or exit();

/**
 * db_schema
 */
function myModule_db_schema(){
    jrCore_db_create_datastore('myModule', 'module');
    return true;
}



get a white screen on the module and cannot set up quota.

error says:
CRI: unable to retrieve quota settings for module: myModule
I ran integrity check and checked the code it appears to be normal.
no other errors in the logs. Its just a basic module to get up and running.


the module consist of:
Lang directory and en-US.php file
icon
include.php
quota.php
schema.php
updated by @developer-networks: 10/30/19 09:02:43AM
michael
@michael
5 years ago
7,714 posts
If myModule and 'module' are the real names you're using try changing them. 'module' is not descriptive of what any module would do.

Try a naming pattern like:
jrBlog 'blog'
jrAudio 'audio'

xxReprocess 'reprocess'
xxBlockUser 'block'

Something that describes what the module does. I suspect 'module' could be the issue.

Or possibly something in the quota.php file because thats what would setup quota settings and the error is quota settings related.
Developer Networks
Developer Networks
@developer-networks
5 years ago
566 posts
Your right, I’m using module just as the example here for the post.

"myModule" is named something like you suggest it could be anything.. "myOranges" orange

I posted the exact quota.php file here to see there is no reason for the error as far as I can see but the system is throwing this error in my module development.


updated by @developer-networks: 07/31/19 12:59:48AM
michael
@michael
5 years ago
7,714 posts
Developer Networks:....I posted the quota.php file ....
where?
Developer Networks
Developer Networks
@developer-networks
5 years ago
566 posts
beginning of this post in the code. That is copied from quota.php

<?php
// make sure we are not being called directly
defined('APP_DIR') or exit();

/**
 * db_schema
 */
function myModule_db_schema(){
    jrCore_db_create_datastore('myOranges', 'orange');
    return true;
}

when I click on the module in the ACP I get this error:

Quote:
error says:
CRI: unable to retrieve quota settings for module: myOranges

updated by @developer-networks: 07/31/19 01:09:05AM
michael
@michael
5 years ago
7,714 posts
Ah, that's your problem. That is database schema and should go in schema.php
Developer Networks
Developer Networks
@developer-networks
5 years ago
566 posts
I apologize I accidentally copied and posted the schema file in the post above here.

I do have that file in the module as well as I noted earlier.

But the quota file in the module looks like this. I changed the name to myOranges.


<?php


// make sure we are not being called directly
defined('APP_DIR') or exit();

/**
 * quota_config
 */
function myOranges_quota_config(){
    return true;
}

What is the meaning of the CRI error? The code looks right and nothing is showing in my error logs.


also it did create the item and item key in the database for the module.
updated by @developer-networks: 07/31/19 01:29:47AM
paul
@paul
5 years ago
4,326 posts
If the module quota settings is just 'on/off' you don't need a quota.php file. Just include the following in the module's init function (in the include.php file) -

    // Core support
    jrCore_register_module_feature('jrCore', 'quota_support', 'myOranges', 'on');

hth


--
Paul Asher - JR Developer and System Import Specialist
Developer Networks
Developer Networks
@developer-networks
5 years ago
566 posts
Yes that did it got rid of the CRI error.


Thank you!



updated by @developer-networks: 07/31/19 02:24:52AM

Tags