Closed (works as designed)
Project:
Grammar Parser Library
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Jul 2011 at 14:13 UTC
Updated:
28 Aug 2011 at 19:50 UTC
Hi Jim
I get the notice mentioned in the title. I know I is a small issue, but it can be annoying on
development installations where notices are switched on. A possible quick fix for the install
file is provided below. Could it help as well to add the grammar parser itself into the requirements
of the info file, so that the constants, or renaming the constants a bit if the module needs its own,
independent defaults?
Cheers,
Stefan
/**
* Minimum recommended value of PHP memory_limit.
*/
if (!defined('PARSER_MINIMUM_PHP_MEMORY')) define('PARSER_MINIMUM_PHP_MEMORY', '128M');
/**
* Minimum recommended value of PHP max_execution_time.
*/
if (!defined('PARSER_MINIMUM_PHP_TIME')) define('PARSER_MINIMUM_PHP_TIME', '30');
Comments
Comment #1
NROTC_Webmaster commentedI added it to the grammar_parser_lib/gplib.install file first and then had to go and add it to the grammar_parser/grammar_parser.install file to get rid of the notice.
I think it just needs to be taken of one of the projects or this line added to both of them to prevent it from failing.
Comment #2
solotandem commentedI run this code all the time on a development environment with notices turned on and never see this error. How are your sites configured? Are you using the latest dev versions of each project?
If you are using the grammar parser library "module" (gplib) with the libraries module, then
- the grammar parser is not installed as a module (it should be in sites/all/libraries)
- its install file is not loaded by PHP
- this error message will not be encountered
Have you read the README file in the grammar parser project (or its project page)? Have you tried the Drush Make file included with gplib?
Comment #3
NROTC_Webmaster commentedsolo,
I had initally installed it as a module and then when I went back and installed it as a library I forgot to delete it from the modules which is likely what was causing the error.
While if installed correctly you will never see this I also don't think that it is a bad idea to have the check in the file.
Comment #4
solotandem commentedComment #5
alan d. commentedFrom the readmes, it appears that both can be installed as modules, and I too got these warnings during the install process. I used the latest versions on the project pages, grammar_parser v1.2 as the dev versoin was much older.
Comment #6
alan d. commentedlol, the next screen gave me the reason why:
But from the readme:
Does the repository required *.module files? It seems strange to include a module in this fashion.
Comment #7
solotandem commentedThe readme indicates, "If used as a module, then install it in a modules directory." That refers to things like the API project that currently uses the parser as a module. That doesn't imply you get a choice when using it with something like Coder that expects the parser to be a library. When used as a module, then you don't also install the grammar parser library (gplib). When used as a library, then put it in a library directory, don't enable it as a module (which you shouldn't be able to by virtue of its location in the file system), and enable gplib.
Any project hosted on drupal.org is either a module or a theme; drupal.org does not offer other categories. The grammar parser is really a library as none of its code relies on Drupal, and is thus Drupal-agnostic.