• Resolved blitz999

    (@blitz999)


    I get this error meassage when activating:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘register_mysettings’ was given in /xxx/wp-includes/plugin.php on line 395

    It activates, but this error shows all over the dashboard.

    The View All Team Members has a rogue bit of php code – ?> after it. This may be part of the issue, a typo rather than a genuine bug.

Viewing 15 replies - 1 through 15 (of 33 total)
  • Plugin Author Abhishek Gupta

    (@abhishekgupta92)

    Hello Nathan,

    I have updated the code and corrected both of these. Thanks for reporting the error. Please change the “broken” to “working” if your error have been corrected.

    Thread Starter blitz999

    (@blitz999)

    Hi there,

    Thanks for the swift response.

    I deleted the old plugin and downloaded again from the plugin directory (1.0)

    I got this error on activation:

    The plugin generated 17 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    However, the header error noted previously is now gone.

    It is conflicting with Super Cache in some way it seems, but even when I deactivate that plugin, it is not saving new team members.

    The live site shows this error message at the top of the page with Super Cache activated:

    Warning: Cannot modify header information – headers already sent by (output started at /xxxl/wp-content/plugins/flipping-team/flipping_team.php:109) in /xxx/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 77

    Plugin Author Abhishek Gupta

    (@abhishekgupta92)

    Hello,

    Sorry for the error faced. There was a hardlink that I have corrected. The plugin should work now. Sorry again for the inconvenience.

    – Abhhishek

    Thread Starter blitz999

    (@blitz999)

    It is nearly there… the error messages are all gone now!

    I am using the 1.2 version. There are a couple of minor things still! :-0

    The plugin is not calling the complete path to some resources:

    wp-content/plugins/flipping_team/jquery.flip.min.js

    rather than:

    https://mysite.com/wp-content/plugins/flipping_team/jquery.flip.min.js

    I think there is a a bit if WP php code that you put in to give the full path.

    Also, the style sheets and JS files are loading into the <body> and not into the header.

    Last thing for me is a theme issue. Your team.php calls the sidebar, but some themes do not call it from the page template. I removed it by hand and the layout came back the way it should have been ?? Just thought you’d like to know!

    Thread Starter blitz999

    (@blitz999)

    Your page template calls the JS and stylesheets, but does not (and I think cannot) place them in the header.

    I checked the WP Codex, and the best way to do this would be from the admin (flipping_team.php), with a call like:

    <?php function writeCSS() {
    echo ( ‘<link rel=”stylesheet” type=”text/css” href=”‘. $x . ‘flipping_team/styles.css”>’ );
    }
    add_action(‘wp_head’, ‘writeCSS’);

    Plugin Author Abhishek Gupta

    (@abhishekgupta92)

    Hello Nathan,

    I have already made the necessary changes. I will commit the code in 15 minutes. Thanks for the help.

    – Abhishek

    Plugin Author Abhishek Gupta

    (@abhishekgupta92)

    Hello Nathan,

    Sorry for the delay. Was attending my classes. I have update the code with the following changes :-

    Corrected all the links ( the confusion was because I was assuming a directory flipping_team though I got flipping-team)

    Added an option to add/remove the sidebar to suit the theme.

    Thread Starter blitz999

    (@blitz999)

    OK… nearly there…

    The styles and js are loading in BEFORE the doctype and the flip.min.js still needs and absolute path to the file. This is what my header looks like from the very top:

    <link rel=”stylesheet” type=”text/css” href=”wp-content/plugins/flipping-team/styles.css” />

    <script type=”text/javascript” src=”https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”></script&gt;
    <script type=”text/javascript” src=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js”></script&gt;
    <script type=”text/javascript” src=”wp-content/plugins/flipping-team/jquery.flip.min.js”></script>

    <script type=”text/javascript” src=”wp-content/plugins/flipping-team/script.js”></script>

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;

    Plugin Author Abhishek Gupta

    (@abhishekgupta92)

    Are the transitions loaded properly in team page? (I have used a shortcut and directly edited the team.php file. Need to change the structure as told by you.)

    Thread Starter blitz999

    (@blitz999)

    No, the transitions are not loading. I believe this is because the js files are called before the doctype and <head> tag – as the above code shows.

    These lines in team.php is missing the absolute path call:

    12: <link rel="stylesheet" type="text/css" href="wp-content/plugins/flipping-team/styles.css" />

    and
    18: <script type="text/javascript" src="wp-content/plugins/flipping-team/script.js"></script>

    I know that when you call a theme style you use:

    src'"<?php echo THEME_URL; ?>/my.css"

    I’ve been looking at the Codex for the plugin URL call of this. I’m a bit new to making plugins, so I don’t yet know what the code equivalent is.

    Plugin Author Abhishek Gupta

    (@abhishekgupta92)

    How does it matter If the call is not absolute and relative?

    Thread Starter blitz999

    (@blitz999)

    Because you can’t call this file from the page header:

    wp-content/plugins/myplugin/myfile.css

    it has to be:

    https://mysite.com/wp-content/plugins/myplugin/myfile.css

    Hence the use of <?php echo THEME_URL; ?>, or something like <?php echo PLUGIN_URL; ?> to call that part of the path and create the full path in the page header.

    So, as an example, if I was calling a file that was in my theme folder, I can write it like this:

    <link rel="stylesheet" type="text/css" href="<?php echo THEME_URL; ?>/sponsor.css" />

    This will output the link in the page header as:

    https://mysite.com/wp-content/mytheme/sponsor.css

    I just don’t know (yet) the echo for a plugin path…

    Plugin Author Abhishek Gupta

    (@abhishekgupta92)

    Hello,

    Sorry for the late response. I was a bit busy with my exams. I have corrected the error. Basically I simply added

    <?php echo get_site_url(); ?>

    Plugin Author Abhishek Gupta

    (@abhishekgupta92)

    Please do tell if you face some other problem while using the plugin.

    Thread Starter blitz999

    (@blitz999)

    Hi there, yes, I hadn’t thought of that echo code.

    The css and js still loads onto the top of the html before the doctype. All the other plugins load their link files after the main theme css in the <head>

Viewing 15 replies - 1 through 15 (of 33 total)
  • The topic ‘[Plugin: Flipping Team] Activation error’ is closed to new replies.