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
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | endnote7.txt | 20.92 KB | waldow |
Comments
Comment #1
rjerome commentedHi Dean,
Yes, please try the -dev version and see if you see the same issue.
Ron.
Comment #2
waldow commentedHi Ron, OK... I'll try that hopefully yet tonight. Thanks, Dean
Comment #3
waldow commentedHI 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
Comment #4
rjerome commentedI 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.
Comment #5
waldow commentedThank Ron... Will do. Dean
Comment #6
waldow commentedHi 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...
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.
Comment #7
rhaschke commentedHi 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.
Comment #8
waldow commentedHi... 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
Comment #9
waldow commentedHI 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
Comment #10
rjerome commentedI 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.
Comment #11
waldow commentedHi 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
Comment #12
rjerome commentedI 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.
Comment #13
waldow commentedThanks... I'll look into that. I have to make sure it doesn't break any of my existing php code. Likely not but... :) Dean
Comment #14
waldow commentedRon, 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
Comment #15
rjerome commentedHi 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.
Comment #16
waldow commentedOK... Thanks. I'll check it out. Dean
Comment #17
waldow commentedHi 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
Comment #18
waldow commentedHi 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
Comment #19
rjerome commentedAny 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.
Comment #20
waldow commentedSure 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
Comment #21
rjerome commentedHi 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.
Comment #22
waldow commentedHi 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