WordPress.org

Ready to get started?Download WordPress

Forums

Archivist - Custom Archive Templates
Error when activating (7 posts)

  1. AndrewGail
    Member
    Posted 2 years ago #

    The error is:

    Parse error: syntax error, unexpected T_FUNCTION in /home/public_html/wp-content/plugins/archivist-custom-archive-templates/archivist.php on line 313

    Issue seems to be with declaring functions inside the preg_replace_callback() function. Quickly moving the function out and passing the callback function name as a sting (e.g. 'TAGS_callback') seemed to work but there are lots of calls to preg_replace_callback() within the main render_element() function.

    I'll try for a more elegant solution later.

    http://wordpress.org/extend/plugins/archivist-custom-archive-templates/

  2. eteubert
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Andrew,

    Yes, these anonymous functions require PHP 5.3. I might consider to restore backward compatibility to PHP 5.2.x doing what you described. Unfortunately, nothing beats the elegance of anonymous functions in that use case :)

  3. Cris
    Member
    Posted 2 years ago #

    PLEASE!!!?!?!?

    I would very much like to use this plug-in, and would be happy to publicly endorse it on my websites, but it needs to be deprecated back to PHP 5.2.

    I would even be willing to make a donation to your efforts to entice you to seek a fix more quickly...

  4. eteubert
    Member
    Plugin Author

    Posted 2 years ago #

    PHP 5.2 compatibility is restored now in version 1.4.

  5. Cris
    Member
    Posted 2 years ago #

    Default template seems to be breaking the page...

    See an example of this:
    http://www.sandiegowebguy.biz/services/archivist-test-page/
    View page source. Everything after the table is missing, and the table isn't being rendered, either.

  6. eteubert
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Cris,

    do you have access to your PHP error log? There must be an error breaking the script after printing the "before template" part. It would help me to figure out the bug.

    Furthermore, could you please paste the shortcode you are using?

  7. eteubert
    Member
    Plugin Author

    Posted 2 years ago #

    My fault, I forgot to add the new file I added to the repository ... quite embarrassing. Fixed in 1.4.1.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic