User:MaxEnt

From refbase

Contact

I'm setting up a test instance of refbase for my partner's thesis (250 references and counting), and possibly a public refbase in the area of Agricultural Land Use Services and Biodiversity Management to go along with a public MediaWiki I'm already hosting in this subject area.

Lately I've been hacking up some XML tools (raw expat at this point for speed) to filter the giant enwiki dump, so I might be poking around with the MODS representation while I'm in XML-space.

Contents

Forum posts

Thanks for the bug report! I've fixed this issue in the refbase development branch and I've replied in more detail to your post in the refbase Help forum. Matthias 14:59, 19 March 2007 (CET)

PHP errors under investigation

NOTE: I sometimes instrument my codebase, so line numbers are not always exact to the stock 0.9.0

missing iconv()

Resolved, and noted in the post-install troubleshooting page.

bad subscript on $authorsArray

I wrote a small Perl script to convert a spreadsheet with several hundred references into RIS format for import into refbase. At some point while I was testing RIS import my log file accumulated several dozen of these, all with the same time stamp to 1s resolution:

PHP Notice:  Undefined offset:  1 in /usr/www/users/foo/refbase-0.9.0/includes/include.inc.php on line 1786

This line of code exists within function reArrangeAuthorContents() (with a 300 character call signature formatted as a single line of program text). It occurs when the statement:

$authorsArray = split($oldBetweenAuthorsDelim, $authorContents);

yields an empty array.

When I looked at the generated RIS from the last of my tests, there were no author fields that looked strange or blank. Well, there were however some odd A1 ducks with little no internal punctuation from the policy side of the fence:

  1. National Round Table on the Environment and the Economy
  2. Manitoba Water Stewardship
  3. Millenium Ecosystem Assessment
  4. Prime Minister's Caucus Task Force on Future Opportunities in Farming
  5. Prairie Habitat Joint Venture

queryArray, foreach, userID troika

Simultaneous timestamps:

PHP Notice:  Undefined variable: queryArray in /usr/www/users/foo/refbase-0.9.0/user_options_modify.php on line 410
PHP Warning:  Invalid argument supplied for foreach() in /usr/www/users/foo/refbase-0.9.0/user_options_modify.php on line 410
PHP Notice:  Undefined variable: userID in /usr/www/users/foo/refbase-0.9.0/user_options_modify.php on line 432

This happened around the time I installed the table prefix patch and I no longer recall exactly what I was doing. I could easily have provoked this by my own munging.

Do you still see these error messages when submitting user_options.php? I suspect that this has been fixed with the recent subversion commits. Matthias 00:30, 21 March 2007 (CET)

Undefined index odfxml.inc

The ODF export test worked fine, but it left behind one instance of the following notice:

PHP Notice:  Undefined index:  Journal Article 
T1 - in /usr/www/users/foo/refbase-0.9.0/includes/odfxml.inc.php on line 332
$fieldParametersArray['BibliographyType'] = 
   $referenceTypesToRefbaseTypesArray[$fieldParametersArray['BibliographyType']];

The same record sets exported into MODS with no errors reported.

On my present install, export to BibTeX, EndNote, and RIS produces blank documents in all formats (the HMTL format has a proper <head> section, and a <body> with only <pre></pre> contents) with no PHP errors emitted. Import from RIS worked fine when tested the other day.

Broken bibutils

I've discovered that BibTeX, EndNote, and RIS all use the bibutils code path. I instrumented the bibutils call in execute.inc.php

bibutilsPath =  
tempDirPath =  
tempFile = refbase-Fj8z30 
program = xml2bib
inputEncoding = -i utf8
outputEncoding = -o utf8

Suspect the empty paths are broken.

execute:

$bibutilsPath = getExternalUtilityPath("bibutils");

include:

$query = "SELECT depends_path FROM $tableDepends WHERE depends_external = " . quote_smart($externalUtilityName);
mysql> select * from rb_depends;
+------------+------------------+-----------------+--------------+
| depends_id | depends_external | depends_enabled | depends_path |
+------------+------------------+-----------------+--------------+
|          1 | refbase          | true            | NULL         |
|          2 | bibutils         | true            | NULL         |
+------------+------------------+-----------------+--------------+

Ah, yes, the depends_path was correctly displayed in the web installer, but I ended up doing a manual install and never addressed this.

Trying a relative path via my symlink within the refbase install directory.

UPDATE rb_depends SET depends_path = "bibutils/" WHERE depends_external = "bibutils";

Worked! All three previously broken output styles worked to output format file.

See the Installation-Troubleshooting page for more troubleshooting info re. this issue. Matthias 00:30, 21 March 2007 (CET)

Code standards

Added to my php.ini:

error_reporting = E_ALL | E_STRICT

TZ handling

PHP Strict Standards:  mktime() [<a href='function.mktime'>function.mktime</a>]: 
It is not safe to rely on the system's timezone settings. 
Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. 
We selected 'America/New_York' for 'EDT/-4.0/DST' instead in 
/usr/www/users/foo/refbase-0.9.0/index.php on line 363

PHP Strict Standards:  date() [<a href='function.date'>function.date</a>]: 
It is not safe to rely on the system's timezone settings. 
Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. 
We selected 'America/New_York' for 'EDT/-4.0/DST' instead in 
/usr/www/users/foo/refbase-0.9.0/index.php on line 364

PHP Strict Standards:  strtotime() [<a href='function.strtotime'>function.strtotime</a>]: 
It is not safe to rely on the system's timezone settings. 
Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. 
We selected 'America/New_York' for 'EDT/-4.0/DST' instead in 
/usr/www/users/foo/refbase-0.9.0/index.php on line 371
refbase uses the MySQL DATE (YYYY-MM-DD) & TIME (HH:MM:SS) field types to store date/time information. This means that date & time information will be always specific to the local time of your server. This won't change in the foreseeable future. Matthias 00:30, 21 March 2007 (CET)

var: Deprecated

var: Deprecated. Please use the public/private/protected modifiers 

Oodles of these, various files, various line numbers, all small.