WordPress.org

Ready to get started?Download WordPress

Forums

Editorial Calendar
Errors in Plugin (9 posts)

  1. styledev
    Member
    Posted 2 years ago #

    I am seeing the following errors when reviewing your plugin for a client.

    Notice: Undefined index: qunit in /Users/bushaw/Sites/wpclients/wp-content/plugins/editorial-calendar/edcal.php on line 488
    Notice: Undefined index: post_type in /Users/bushaw/Sites/wpclients/wp-content/plugins/editorial-calendar/edcal.php on line 628

    Try using isset() to verify your $_GETs first.

    Also, after enabling this on my local install (running as multisite) this was not working. The red error box shows up immediately with no message and the days show up with undefined in the title. Screenshot here: http://cl.ly/1H1p153w3w3B1623312f

    http://wordpress.org/extend/plugins/editorial-calendar/

  2. Zack Grossbart
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you for using the Editorial Calendar. I'm sorry you're having trouble with it. What version of the calendar are you using? Your line numbers don't match up with the latest version.

    What URL are you using when you access the calendar? Any chance I could access your blog?

    Thanks,
    Zack

  3. styledev
    Member
    Posted 2 years ago #

    I downloaded the current version (1.8.6) from http://wordpress.org/extend/plugins/editorial-calendar/

    I installed it locally (MAMP PRO) and have not put it on my client's site due to this issue. It may just be an issue locally but I haven't run into this before.

    Mac OS X Snow Leopard 10.6.8
    MAMP PRO v1.9.6.1
    Wordpress 3.3.1 running with Multisite on
    No other plugins enabled and tried with Twenty Eleven theme activated.

  4. Zack Grossbart
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for the information. I haven't tried the calendar with MAMP yet. I'll try to set it up today.

    Do you know what version of the PHP you're using?

    You might want to try installing it on a LAMP stack WordPress server.

    Thanks,
    Zack

  5. Zack Grossbart
    Member
    Plugin Author

    Posted 2 years ago #

    I just set this up on MAMP 2.0.5 and everything worked for me. I tried PHP 5.2.17 and 5.3.6. The plugin ran and all unit tests worked properly.

    Is it possible that MAMP PRO works differently than the regular version? I'm happy to make a change to fix this issue, but I'm reluctant to change something if I can't reproduce the problem.

    Can you think of anything that's different in your setup? Does this work for you with the non-pro version of MAMP?

    Thanks for helping me track this down,
    Zack

  6. styledev
    Member
    Posted 2 years ago #

    I am not sure about the MAMP Pro version but I will pull your plugin on to a live test site of mine and check it out there. I am using PHP 5.3.5.

    I do know that the two lines above will show up if you enable WP_DEBUG in wp-config.php in your root folder of wordpress. To fix those two warnings/errors you should use isset().

    Line 488 should become:

    if ( isset($_GET['qunit']) && $_GET['qunit'] ) {

    Line 628 should become:

    if( isset($_GET['post_type']) ) $post_type = $_GET['post_type'];
    else $post_type = false;

    I will get back to you on the other issue.

  7. styledev
    Member
    Posted 2 years ago #

    I figured out the last issue. For some reason with WP_DEBUG on it showed me the first two errors but not the third error, this one showed up in the my browser debug console.

    http://cl.ly/391G1s2M3k1f3b2k3W46

    You can use the same fix as line 628 for line 646 (function edcal_get_posttype_singlename). With those three fixes in the plugin passes with WP_DEBUG on and all is good :) Curious, is the version on this site the most current version, I know you said earlier that the lines didn't match up.

    Thank you for being so responsive and working with me on this. I know that building good plugins like this one can be a thankless job but I truly appreciate it.

    Thank you.

  8. styledev
    Member
    Posted 2 years ago #

    Actually, sorry to bug you again but I did a test schedule post and it doesn't show up with WP_DEBUG mode on. I get this in the console. Once again it doesn't show up if DEBUG mode is off and when it is off it works as stated.

    edit.php:3072			Resetting to date from the edcal_Date cookie: Mon Feb 20 2012 00:00:00 GMT-0800 (PST)
    edit.php:3072			Getting posts from Mon Feb 06 2012 00:00:00 GMT-0800 (PST) to Mon Apr 09 2012 00:00:00 GMT-0700 (PDT)
    load-scripts.php:4		GET http://theconfidencemen.com/wp-admin/images/screen-options-right.gif 404 (Not Found)
    edcallib.min.js:44		Uncaught SyntaxError: JSON.parseIt
    edcallib.min.js:44		JSON.parseIt
    edit.php:2735			jQuery.ajax.success
    load-scripts.php:2		f.Callbacks.n
    load-scripts.php:2		f.Callbacks.o.fireWith
    load-scripts.php:4		w
    load-scripts.php:4		f.support.ajax.f.ajaxTransport.send.d
  9. Zack Grossbart
    Member
    Plugin Author

    Posted 2 years ago #

    I haven't tried the calendar in debug mode. You're probably right about using isset. I'll make that change in the next release, but it doesn't really look like the cause of your issue.

    The error with str_newpost_title is a serious problem, but I'm not sure what's causing it. On most blogs this line comes out in the HTML source like this:

    edcal.str_newpost_title = "New Post - " ;

    There's nothing in that line which is accessing any index or running any code. What language are you running your blog in?

    The last error you posted indicates the server isn't returning valid JSON to the client. This might be another instance of the previous issue, but I've only ever seen this issue when another plugin is adding extra content to the post output.

    This really looks like another plugin is conflicting with the Editorial Calendar.

    Thanks,
    Zack

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic