WordPress.org

Ready to get started?Download WordPress

Forums

Flipping Team
[resolved] Activation error (34 posts)

  1. blitz999
    Member
    Posted 3 years ago #

    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.

  2. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  3. blitz999
    Member
    Posted 3 years ago #

    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

  4. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

    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

  5. blitz999
    Member
    Posted 3 years ago #

    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:

    http://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!

  6. blitz999
    Member
    Posted 3 years ago #

    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');

  7. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

    Hello Nathan,

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

    - Abhishek

  8. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  9. blitz999
    Member
    Posted 3 years ago #

    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="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
    <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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  10. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

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

  11. blitz999
    Member
    Posted 3 years ago #

    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.

  12. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

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

  13. blitz999
    Member
    Posted 3 years ago #

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

    wp-content/plugins/myplugin/myfile.css

    it has to be:

    http://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:

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

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

  14. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

    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(); ?>

  15. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

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

  16. blitz999
    Member
    Posted 3 years ago #

    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>

  17. blitz999
    Member
    Posted 3 years ago #

    Hi Abhishek,

    Did you manage to fix the css and the js problem? It loads prior to the doctype declaration.

  18. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

    No. I am bit busy with my GSOC proposal. Was not able to fix it. Though I know the source of the error.

  19. silverj93
    Member
    Posted 3 years ago #

    Hey,

    I am having trouble installing the plugin... Any advice?

  20. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

    What problem are you facing.

  21. silverj93
    Member
    Posted 3 years ago #

    I don't really understand how I am supposed to get it running after I have installed the plugin.

  22. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

    As I have mentioned in the instructions, you have to do the following steps in order to activate and get the plugin up and running :

    * Copy the contents in the wp-content/plugins directory.
    * Activate the plugin through the 'Plugins' menu in WordPress
    * Copy the team.php file to the template directory of your theme.
    * Configure the settings and add team-mates through Flipping Team Settings

  23. silverj93
    Member
    Posted 3 years ago #

    I apologize.I do not understand this step. Could you be more detailed?

  24. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

    Which step. I think first two steps should be easy. In the third step, copy team.php file from the plugin directory to the templates directory.

    Next, create a new page and select team as the template.

  25. silverj93
    Member
    Posted 3 years ago #

    Where is the template directory?

  26. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

    It is usually the root directory (almost 100%) of the theme. For example if you are using twenty-ten navigate to wp-content/themes/twentyten/ . And copy the file there.

  27. silverj93
    Member
    Posted 3 years ago #

    is there an email address I could email you some pictures of my options? I got a custom theme from wp-zoom so it is kinda unusual. I would really appreciate it!!!

  28. Abhishek Gupta
    Member
    Plugin Author

    Posted 3 years ago #

    Sure. Visit my webpage at http://abhishekgupta92.info for the same.

  29. silverj93
    Member
    Posted 3 years ago #

    is there an email on the site?

  30. silverj93
    Member
    Posted 3 years ago #

    I sent an email.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic