I am using the latest dev modules of coder & grammar parser. When I try to convert files in coder upgrade I get this error
"Fatal error: Class 'PGPReader' not found in C:\wamp\www\d7\sites\all\modules\coder\coder_upgrade\conversions\begin.inc on line 126"

and when I try to go to settings in Coder upgrade I get this error

Fatal error: Class 'PGPParser' not found in C:\wamp\www\d7\sites\all\modules\coder\coder_upgrade\includes\settings.inc on line 14

Comments

solotandem’s picture

Assigned: Unassigned » solotandem
Status: Active » Fixed

Thanks for spotting the second item. Fixed in this commit.

Is the first caused by you not having installed the 2.x version of Libraries API module?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

joseph.olstad’s picture

I am getting the first error.
Using the libraries 2.x dev
and coder dev

PHP Fatal error: Class 'PGPReader' not found in /srv/www/htdocs/drupal-7.2/sites/all/modules/coder/coder_upgrade/includes/main.inc on line 348

UPDATE: I am trying this again , this time installing the grammar_parser module. I previously just had the grammar_parser_lib module . Trying this, will update status to see if this fixes it.

solotandem’s picture

Please note grammar_parser is to be installed in sites/all/libraries, not sites/all/modules.

joseph.olstad’s picture

Ah, thanks , helps if I install the libraries in the libraries folder.

UPDATE: I've run the code review, the upgrader, now I'm currently hand-editing the last bits. I am upgrading someone elses module from Drupal 6 to Drupal 7. With luck, it will be done soon.

Anonymous’s picture

Status: Closed (fixed) » Active

I'm seeing the PGPReader class not found error as listed in the Issue Summary.

$ cat libraries.info
name = Libraries
description = Allows version dependent and shared usage of external libraries.
core = 7.x
files[] = tests/libraries.test

; Information added by drupal.org packaging script on 2012-03-07
version = "7.x-2.0-alpha2+1-dev"
core = "7.x"
project = "libraries"
datestamp = "1331079805"

I then went to config/development/coder/upgrade/settings and received an error:

Failed opening required 'e:\opt\drupal\drupal7\drupal-7.0/sites/d7port/libraries/grammar_parser/engine/parser.inc' 
(include_path='.;C:\php\pear') in E:\opt\drupal\drupal7\sites\d7port\modules\coder\coder_upgrade\includes\settings.inc on line 34

It should open "engine/grammar_parser.parser.inc" instead but resolving that did not resolve the issue of PGPReader class not being included before coder\coder_upgrade\conversions\begin.inc is put into action.

So I went to coder_upgrade\conversions\begin.inc and inserted before the first function:

require_once DRUPAL_ROOT . '/' . libraries_get_path('grammar_parser') . '/engine/grammar_parser.parser.inc';
require_once DRUPAL_ROOT . '/' . libraries_get_path('grammar_parser') . '/engine/grammar_parser.reader.inc';
require_once DRUPAL_ROOT . '/' . libraries_get_path('grammar_parser') . '/engine/grammar_parser.list.inc';
require_once DRUPAL_ROOT . '/' . libraries_get_path('grammar_parser') . '/engine/grammar_parser.object.inc';
require_once DRUPAL_ROOT . '/' . libraries_get_path('grammar_parser') . '/engine/grammar_parser.writer.inc';
require_once DRUPAL_ROOT . '/' . libraries_get_path('grammar_parser') . '/engine/grammar_parser.editor.inc';

Once it completed the task once I went through the process again to insure that the conversion was fully successful in a run from old to new. The question, should the above addition to begin.inc be inserted somewhere else?

Anonymous’s picture

Assigned: solotandem » Unassigned
solotandem’s picture

Assigned: Unassigned » solotandem
Status: Active » Closed (fixed)

You are referencing files that have long since been renamed. Pleased check the versions of each project you are using. Please open a support issue if you can not resolve this, as this issue has long been put to rest.

Anonymous’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

How can they "long since been renamed"? I just days ago downloaded the -dev versions. How is the issue put to rest?

$ cat coder.info
name = Coder
description = Developer Module that assists with code review and version upgrade

package = Development
core = 7.x
files[] = coder.module

; Information added by drupal.org packaging script on 2011-12-30
version = "7.x-1.x-dev"
core = "7.x"
project = "coder"
datestamp = "1325246719"
$ cat gplib.info
name = Grammar Parser Library
description = Libraries interface to the Grammar Parser library.
package = Libraries
core = 7.x

; libraries version string should be ">=2"
; however until there is a "recommended" release on the 2.x branch
; the version requirement can not be specified here
; this is a core bug
;dependencies[] = libraries (2.x)
;dependencies[] = libraries (>=2)
dependencies[] = libraries

; Information added by drupal.org packaging script on 2011-08-19
version = "7.x-1.x-dev"
core = "7.x"
project = "grammar_parser_lib"
datestamp = "1313713670"

$ cat libraries.info
name = Libraries
description = Allows version dependent and shared usage of external libraries.
core = 7.x
files[] = tests/libraries.test

; Information added by drupal.org packaging script on 2012-03-07
version = "7.x-2.0-alpha2+1-dev"
core = "7.x"
project = "libraries"
datestamp = "1331079805"
solotandem’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Please respect my request to open a support issue.

The grammar parser "files" you mention loading in #6 were renamed many months ago; that is what "long since been renamed" refers to. So, that indicates to me that something you are using is way out of date. Please take a look at the grammar parser code file names; they are no longer prefixed with "grammar_parser_."