Support » Plugins and Hacks » [Plugin: Archivist – Custom Archive Templates] Error when activating

[Plugin: Archivist – Custom Archive Templates] Error when activating

  • 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.


Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Eric Teubert


    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 🙂


    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…

    Plugin Author Eric Teubert


    PHP 5.2 compatibility is restored now in version 1.4.

    Default template seems to be breaking the page…

    See an example of this:
    View page source. Everything after the table is missing, and the table isn’t being rendered, either.

    Plugin Author Eric Teubert


    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?

    Plugin Author Eric Teubert


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

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Archivist – Custom Archive Templates] Error when activating’ is closed to new replies.