Skip to content

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

Open

Description

@maladd

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

Activity

  1. carcam commented on Jun 18, 2019

    @carcam
    Owner

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

  2. maladd commented on Jun 18, 2019

    @maladd
    Author
  3. maladd commented on Jul 18, 2019

    @maladd
    Author

    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!

  4. maladd commented on Aug 9, 2019

    @maladd
    Author

    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?

  5. maladd commented on Aug 9, 2019

    @maladd
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions