Skip to:
Content
Pages
Categories
Search
Top
Bottom

Error when adding a new lecture

  • Using WP 3.2.1, BP 1.5, CW 0.9 and am getting this error when clicking the “Add new lecture” button:

    Warning: reset() expects parameter 1 to be array, null given in /home/mcorgan/dev.researchables.com/wp-content/plugins/buddypress-courseware/lectures/lectures.class.php on line 319

    Upon further investigation, it appears as though $term_id in function has_courses in class courses.class.php is returning null. This is causing has_courses to return null. What would cause this?

    Clicking on any of the other buttons works fine. BTW, this is the very first lecture attempting to be added to a course.

Viewing 17 replies - 1 through 17 (of 17 total)
  • Profile photo of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    @markcorgan its not an error it’s a warning!
    Looks like you have the PHP/WordPress debugging turned on.

    Also, did you update the course page before adding lectures? If not, that’s the warning from.
    `has_courses()` is trying to find courses for current group id you are managing.

    @sushkov I agree that the message is a warning but interestingly I do not have WP_DEBUG set to true. If I do set WP_DEBUG to true, then I get all the WP notices and warnings.

    Yes, I did update the course page before adding a lecture. I can add a lecture but the lecture count in the “At a glance” section does not increment. It remains at zero.

    Also, in the “At a glance” section, the first bullet reads “Groups course class started by and managed by 0 teacher(s) for this group”. The course name, started by name and teacher count is not updating correctly.

    In addition, when creating a new assignment, the lecture I had created does not appear in the Linked Lecture dropdown list and the Assignment does not save the info either.

    It seems as though there is a relationship problem when storing course info and anything related to it. What other information do you need to help troubleshoot this issue? Thanks!

    Profile photo of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    @markcorgan

    Enable WP_DEBUG and check your `wp-admin`
    If content isn’t there, it’s a problem.

    What setup are you using? Did you updated from an older installation? Brand new?

    @sushkov The content is there, all 32 courses which happen to be all the same one. Is this normal? Lectures have no entries however.

    I am using WP 3.2.1, BP 1.5 and CW 0.9. I upgraded CW from 0.9 pre-release to 0.9 prod downloaded from this group. Would removing the plugin and all of its database data be a good place to start? Maybe there is some data issue where relationships got messed up? What should I look for in MySQL to remove everything related to CW? Thanks for the help.

    Profile photo of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    There were some taxonomy changes from 0.9-beta to 0.9 release.
    Please try a re-install, if not email me personally, so we can sort this out: stas@nerd.ro

    Profile photo of mrsjsmith
    mrsjsmith
    Member

    @mrsjsmith

    I’m getting the same error, but no content is being created. I’m also unable to create assignments in 2 of my courses

    Profile photo of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    Could you post me the current setup you have and what plugins do you use?

    Profile photo of mrsjsmith
    mrsjsmith
    Member

    @mrsjsmith

    WordPress 3.2.1.
    BuddyPress 1.5
    Courseware 0.9

    Plugins:
    Akismet
    BuddyPress
    BuddyPress Mobile
    BuddyPress Private Community
    BuddyPress ScholarPress Courseware
    Google Analyticator
    Google XML Sitemaps
    Jetpack by WordPress.com
    Secure WordPress
    Simple Tags
    WordPress Database Backup
    wp-scanner activator
    WP Security Scan

    I’ve tried deactivating all plugins but BuddyPress and Courseware and it still doesn’t work. The two courses I created before the latest update work, but the latest two don’t

    Profile photo of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    @mrsjsmith thanks.
    Got a DB dump from a user with the same issue, looking at it.

    Hi Stas,

    As in my other topic, I’m not receiving any errors, just nothing is happening when I attempt to create lectures or assignment in certain groups. Thanks again for your excellent support.

    Bryan

    Profile photo of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    If you upgraded from previous version of Courseware, please go to your Profile and update your Courseware role.
    This should trigger some hooks and update the list of capabilities a teacher should have!

    Profile photo of mrsjsmith
    mrsjsmith
    Member

    @mrsjsmith

    The newest Courseware update seems to have fixed this, thanks!

    I’m still having the issue – no matter what I set my courseware privileges to be, even after a brand new install, still nothing happens when I attempt to create a lecture or an assignment in certain groups. I can post a video if that would help.

    Profile photo of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    please go to your Profile and update your Courseware role

    Thanks Stas for coding this. It is a great idea.

    What is the status of this issue? I am having the same problem. WordPress 3.3, BuddyPress 1.5.2, Courseware 0.9.3 I get the following warning when trying to add a lecture:

    Warning: reset() [function.reset]: Passed variable is not an array or object in /mnt/webg/d1/76/52875176/htdocs/wp-content/plugins/scholarpress-buddypress-courseware-06fe090/lectures/lectures.class.php on line 319

    I’m having the same problem as girlbot. I get the exact same warning and I cannot add a lecture. Any solutions?

    Thanks!

    Profile photo of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    A new release is almost ready.

Viewing 17 replies - 1 through 17 (of 17 total)
  • The topic ‘Error when adding a new lecture’ is closed to new replies.
Skip to toolbar