WordPress.org

Ready to get started?Download WordPress

Forums

WP Defer Loading
[resolved] Plugin could not be activated because it triggered a fatal error. (6 posts)

  1. Matt Day
    Member
    Posted 8 months ago #

    On attempting to active this plugin...

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected $end in <my-path>/wp-content/plugins/wp-defer-loading/wp-defer-loading.php on line 252

    http://wordpress.org/plugins/wp-defer-loading/

  2. bassjobsen
    Member
    Plugin Author

    Posted 8 months ago #

    @mattday thanks for posting your issue. Could you confirm you are using version 1.0.1 of the plugin?

    wp-defer-loading.php of version 1.0.1 don't have a line 252. I found some white space on the end of the file this will gives you troubles maybe.

  3. Matt Day
    Member
    Posted 8 months ago #

    Sorry for the lack of info. I confirm version is 1.0.1.

    The cause of the problem turned out to be the inconsistent opening tag '<?' on line 236. Changing it to '<?php', as used everywhere else in the file fixes this issue. (Note: this occurred on a server running nginx - I did not observe it on a different server running apache).

    The plugin actives after that fix, but it still does not work. It spews out what should be Javascript as visible text at the top of each page. Looking at the page source, there are superfluous script tags, but I haven't had a chance to look at it any further.

    <script type="text/javascript">
    
    			 // Add a script element as a child of the body
    			 function downloadJSAtOnload() {
    			 <script type='text/javascript'>try{jQuery.noConflict();}catch(e){};</script>
    var element = document.createElement("script");
    element.appendChild( document.createTextNode(...
  4. bassjobsen
    Member
    Plugin Author

    Posted 8 months ago #

    @mattday thank you very much!!!!!!
    I changed this and upload as version 1.0.2

    Please let me know if you find any other issue.

  5. bassjobsen
    Member
    Plugin Author

    Posted 8 months ago #

    @mattday Note is marked the above as resolved. This is not correct since you still got the output errors. I post this errors here: https://github.com/bassjobsen/wp-defer-loading/issues/11

    I will try to fix them a.s.a.p.
    I you got any further information like the theme or plugin(s) used, please let me know.

  6. Matt Day
    Member
    Posted 8 months ago #

    Thanks, I will post anything further on github, but not sure when I will get a chance to look at it again. The theme was just a very slightly modified version of Twenty Twelve.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.