HI Folks,

I can not seem find a good reason that after installing Bibliography that all seems to work except I can't open the import page / node. I always get a blank page. The page / node seems to die in loading. I am using Drupal 6.8. I get the same error in my custom theme and garland. I am using 6.x01.0-rc2. I suspect a bug though I could be missing something. Perhaps I should reinstall or maybe move to the 'dev' version. I have been using the drupal 5 version nicely before.

Dean

CommentFileSizeAuthor
#20 endnote7.txt20.92 KBwaldow

Comments

rjerome’s picture

Hi Dean,

Yes, please try the -dev version and see if you see the same issue.

Ron.

waldow’s picture

Hi Ron, OK... I'll try that hopefully yet tonight. Thanks, Dean

waldow’s picture

HI Ron, I just uninstalled rc2, installed the dev, and ran the update.php. I now DO see the import page which seems good. Suggestions? Work from the dev version? Or, is it too of a dev version to work from? Thanks! Dean

rjerome’s picture

I would say stay with the -dev version as it is getting very close to the release version, and I rarely commit a dev version that doesn't work.

Ron.

waldow’s picture

Thank Ron... Will do. Dean

waldow’s picture

Version: 6.x-1.0-rc2 » 6.x-1.x-dev

Hi Ron,

Well, I started trying to use Biblio by exporting my biblio 5 short list of 19 publications to the three versions of output: tagged, xml, and bibtex. I then tried to import first the bibtex and it appeared to fail on line 86 and failed to read in the authors. I then tried xml as well as endnote tagged and had the same basic result. It seems to only be having problems with the authors... they come out empty.

Here is the error... which is repeated for each entry (I blanked out the path a bit):

# warning: Wrong parameter count for preg_replace() in '....'/chemdept/sites/all/modules/biblio/biblio.contributors.inc on line 86.

Here is one example of the xml record...


<?xml version="1.0" encoding="UTF-8"?>
<XML><RECORDS>
<RECORD>
	<REFERENCE_TYPE>0</REFERENCE_TYPE>
	<AUTHORS>
		<AUTHOR>Barham, Bethany</AUTHOR>
		<AUTHOR>Fosser, Kari</AUTHOR>
		<AUTHOR>Voge, Gretchen</AUTHOR>
		<AUTHOR>Waldow, Dean</AUTHOR>
		<AUTHOR>Halasa, Adel</AUTHOR>
	</AUTHORS>
	<YEAR>2001</YEAR>
	<TITLE>Phase Separation Kinetics of a Polymer Blend Modified by Random and Block Copolymer Additives</TITLE>
	<SECONDARY_TITLE>Macromolecules</SECONDARY_TITLE>
	<VOLUME>34</VOLUME>
	<PAGES>514-521</PAGES>
	<ACCESSION_NUMBER>20014881</ACCESSION_NUMBER>
	<ABSTRACT>The phase sepn. behavior of blends of polystyrene and polybutadiene modified by copolymer additives was studied using light scattering techniques. Block and random copolymers with equal styrene and butadiene content and a random copolymer with unequal monomer compn. were used as additives at a concn. of 2.5%. The sym. additives lowered the phase boundary with increasing concn. while the asym. additive destabilized the phase boundary. The data demonstrate a slowing of the kinetics with the addn. of any of the copolymers. In comparison to the binary blend, droplet sizes in the early stage were smaller with added sym. block copolymer and larger with added asym. random copolymer. Scaling anal. of the intermediate stage kinetics showed some deviations relative to binary scaling results. Deviations from Porod's law indicate that modifications to the interfacial boundary are most notable for the asym. random copolymer. Self-similarity was seen to hold for all of the systems.</ABSTRACT>
</RECORD>

Does this look like a bug? If so should I start another issue?

Thanks,

Dean

PS... I tried to play with the php of the bilblio.contributors.inc file on line 86 - the regex part, and didn't have any luck figuring out the problem. I am still learning to code php in drupal. Hard to put prints in to see the variables. Anyway, I also figured out that if I try to simply add a reference it errors the same way what the error in line 86 and the authors come out blank... presumably because the regex fails.

rhaschke’s picture

Hi Dean,

which version of PHP do you use? Prior than 4.02? If so, try removing the last argument of preg_replace (-1), which limits the number of replacements.

waldow’s picture

Hi... Nope. I am using 4.3.9 but it is still not version 5 though... Other ideas? BTW, -1 is the second to last argument I think in the version I have installed with $count or something like that last. I believe the -1 says not to limit replacements while the $count houses the number of instances replaced. I am not too familiar with regex.

I also tried just commenting out the regex line (86) since that should technically only matter if I have an et al (right?). I manually added a reference and I didn't get the error but I also didn't get any author information even though I added the information. So, I am wondering if the issue might be that the array doesn't have author info (due to an earlier problem) which then maybe showing up as an error in line 86.

Thanks, Dean

waldow’s picture

HI Ron,

I thought I would check in... when you get time I am happy to try other things related to getting biblio to import the authors. I have not figured out if it is something specific to my install or more general. It does seem that authors are not making it into the variable or getting deleted somehow. Aside from that I don't see other problems.

Let me know what I can do.

Thanks,

Dean

rjerome’s picture

I tried importing the XML snippet you posted and it worked fine for me, but I'm running php 5.2.

I'll try it with 4.x tomorrow (it's a bit of a pain to switch back and forth), but I would really encourage you to move to PHP 5.x unless it's absolutely impossible for some reason (if so, I would be curious to know what that reason is).

Cheer,

Ron.

waldow’s picture

Hi Ron, Perhaps it is a PHP issue. I am running Redhat ES4 and in terms of up2date is still at php 4. My challenge is mostly time and I doubt our support folks will have time. It might not be a lot of time for folks who do that a lot. So, I have been trying to live with 4.x for now until we upgrade our server mid spring to early summer. The only place I have run into an issue (perhaps until now) with with the module for FileField. I'll see the feasibility of moving to php5. Thanks... Dean

rjerome’s picture

I see now, that probably explains why there are so many people still running PHP4. I'm running CentOS 4 (essentially a rebuild of ES4) on one of my machines, and I'm using the PHP 5 rpms from http://www.mirrorservice.org/sites/mirror.centos.org/4.7/centosplus/i386..., these should work with "shrink wrapped" RHEL4 also.

Ron.

waldow’s picture

Thanks... I'll look into that. I have to make sure it doesn't break any of my existing php code. Likely not but... :) Dean

waldow’s picture

Ron, It is looking like I won't be able to work with php until we get our new box. Could you point me in the direction of where this code might be breaking and I can try to debug a bit? It might turn out to be a php5 only code problem but if I can get the import to work it would get me running until we can get our new box up and running in about 4 months. If not, I can try to poke around a bit too. If I find anything, I will let you know. Thanks, Dean

rjerome’s picture

Hi Dean,

If you standby another day or two, I think the next release may solve your problems.

Look for a new -dev version by the weekend.

Ron.

waldow’s picture

OK... Thanks. I'll check it out. Dean

waldow’s picture

Hi Ron, I will keep watching and when you get time for a dev I'll try it out. Wish I could help but I am doubting my php is up to the task. :) Good luck. Dean

waldow’s picture

Hi Ron, I have tried the new RC3 and have now a different set of problems. I am able to import but the last author of the first paper now becomes the single author of all papers that follow in the import. Also when I click on the sub menu authors under thinks there are the authors from the first paper imported but no names show up on the page. I'll try the dev version later this weekend. Should I start a new issue? Dean

PS... I tried the new dev version and had the same problem. I get the following warning with many repeats:

user warning: Duplicate entry '274-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (273, 274, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.

Dean

rjerome’s picture

Any chance you could post the import file so I can test it? If you don't want to post it, send me a message via my contact form and we can do it off line.

Ron.

waldow’s picture

StatusFileSize
new20.92 KB

Sure Ron... they are public references... I'll include the en7.xml version as a *.txt file so change the extension back to xml. See attached.

So to double check... I deleted biblio records, disabled biblio, uninstalled biblio, reinstalled biblio, and imported the attached file as admin while setting the user ID to my non admin account. I got the following:

* user warning: Duplicate entry '292-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (291, 292, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '293-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (292, 293, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '295-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (294, 295, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '296-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (295, 296, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '297-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (296, 297, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '298-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (297, 298, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '299-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (298, 299, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '300-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (299, 300, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '301-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (300, 301, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '302-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (301, 302, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '303-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (302, 303, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '304-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (303, 304, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '305-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (304, 305, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '306-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (305, 306, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '308-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (307, 308, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '309-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (308, 309, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.
* user warning: Duplicate entry '310-1-1-0' for key 1 query: INSERT INTO biblio_contributor (nid, vid, cid, auth_type, auth_category, rank) VALUES (309, 310, 1, 1, 1, 0) in /var/www/chemdept/includes/common.inc on line 3425.

I wonder if a part of the database is not getting deleted or is goofed up somehow? Likely not but...

Let me know what I can do.

Thanks Ron, Dean

rjerome’s picture

Hi Dean,

I took a while but I finally tracked this bug down! It was a PHP 4 related issue related to the fact that in PHP5 by default, objects get passed to functions by reference however in PHP4 they do not. There was one function in the biblio.module file called _biblio_prepare_submit() which did not explicitly specify pass by reference, so some of the author information was being lost at this point and thus the database save was not working correctly. It's fixed in the -dev verion now.

Ron.

waldow’s picture

Status: Active » Fixed

Hi Ron, I tested it and I changed the status to 'fixed'! Good job tracking that down! Many thanks. I was able to upload the en7 xml version. I didn't take the time to check the others but they should but fine now too. I think that should take care of the issues I have seen. Nice module! Dean

Status: Fixed » Closed (fixed)

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