Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import bibtex files w/ php7. #23

Open
maladd opened this issue May 7, 2019 · 5 comments
Open

Can't import bibtex files w/ php7. #23

maladd opened this issue May 7, 2019 · 5 comments

Comments

@maladd
Copy link

maladd commented May 7, 2019

Is anyone else having problems importing bibtex files since upgrading to Joomla 3.9 and using php 7+?

This is the error I receive

Call to undefined function split()

The problem seems to w/ Bibtex.php

@carcam
Copy link
Owner

carcam commented Jun 18, 2019

Hi @maladd, still having issues? Can you please provide your exact version of PHP?

@maladd
Copy link
Author

maladd commented Jun 18, 2019 via email

@maladd
Copy link
Author

maladd commented Jul 18, 2019

I typo'd - my production server is using php5.6. The latest version of php the production server can use is 7.2.18. I can't move my site off php5 until Jresearch works.

I am developing a site design that will run on php7.2, and we use JResearch for our staff pages and publications site.

Thanks for your efforts!

@maladd
Copy link
Author

maladd commented Aug 9, 2019

I redownloaded the latest build and installed it. I made the following changes to the BibTex.php file and my bibtex file uploaded almost successfully.

administrator/components/com_jresearch/includes$ diff BibTex.php-orig BibTex.php
421c421
< $arr = split('{', $entry);

        $arr = explode('\{', $entry);

630c630
< $authorarray = split(' and ', $entry);

    $authorarray = explode(' and ', $entry);

642c642
< $tmparray = split(' |~', $author);

            $tmparray = explode(' |~', $author);

The Type appears as in the Backend as JRESEARCH_ARTICLE{CHHATWAL2019. The value for pubtype in the database is "article{chhatwal2019". The line in the BibTex file is "@Article{Chhatwal2019a,", so the process cut the tailing character off the end of the citekey, as well as failing to put in the correct field. Not a big deal, but I notice it also lowercased the citekey from the original text.

Any thoughts?

@maladd
Copy link
Author

maladd commented Aug 9, 2019

Got it. Remove the escape from line 421.

$arr = explode('{', $entry);

Pubs now upload as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants