I am unable to create units in my course

I have tried to create a course with my coursepress. I used the previous version and was roughly 20 units into my course. When I upgraded the units were gone and the plugin was interfering with my site. I have solved the interference problem but I am still unable to add units to my course. I have an anticipated start date of January 1, 2017 for my course so therefore I need to get it done. Please address this issue asap. I have allowed access to my side through the dashboard. I have tried reverting my website to the default theme and deactivating all of my plugins as well as deleting and reinstalling coursepress. Thanks for the prompt reply and resolvement. I am currently trying out the membership and as of yet, will not continue unless this issue is corrected.

  • Jude

    Hey Shannon

    Hope all is well with you and you are having a great week !

    I took a peek inside and looks like you have other LMS plugins installed. It could be a conflict of some sort too, can you try a plugin conflict test as detailed here ? Please use a default theme when doing this.

    http://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Also can you turn on WP_DEBUG and post the exact error messages you see here, specifically when you add new units ?

    https://codex.wordpress.org/Debugging_in_WordPress

    Thank you for being a WPMU DEV member and have a fantastic day !

    Cheers
    Jude

  • Shannon

    I have done the plugin conflict test as I mentioned before and did not fix the issue. Below is the log when I try to add units

    )

    [status_code] => 200
    [protocol_version] => 1.1
    [success] => 1
    [redirects] => 0
    [url] => https://rest.akismet.com/1.1/deactivate
    [history] => Array
    (
    )

    [cookies] => Requests_Cookie_Jar Object
    (
    [cookies:protected] => Array
    (
    )

    )

    )

    [filename:protected] =>
    [data] =>
    [headers] =>
    [status] =>
    )

    )

    )

    )

    [19-Dec-2016 19:09:47 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 457
    [19-Dec-2016 19:09:47 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 370
    [19-Dec-2016 19:09:50 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 370
    [19-Dec-2016 19:09:50 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 457
    [19-Dec-2016 19:09:52 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 457
    [19-Dec-2016 19:09:52 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 370
    [19-Dec-2016 19:09:54 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 457
    [19-Dec-2016 19:09:54 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 370
    [19-Dec-2016 19:10:07 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 457
    [19-Dec-2016 19:10:07 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 370
    [19-Dec-2016 19:10:12 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 370
    [19-Dec-2016 19:10:12 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 457
    [19-Dec-2016 22:04:37 UTC] WordPress database error Duplicate key name 'location_type_code' for query ALTER TABLE wp_wuuq_woocommerce_tax_rate_locations ADD KEY location_type_code (location_type(40),location_code(90)) made by activate_plugins, activate_plugin, do_action('activate_woocommerce/woocommerce.php'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Install::install, WC_Install::create_tables, dbDelta
    [19-Dec-2016 22:04:37 UTC] WordPress database error Duplicate key name 'location_type_code' for query ALTER TABLE wp_wuuq_woocommerce_shipping_zone_locations ADD KEY location_type_code (location_type(40),location_code(90)) made by activate_plugins, activate_plugin, do_action('activate_woocommerce/woocommerce.php'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Install::install, WC_Install::create_tables, dbDelta
    [19-Dec-2016 22:04:37 UTC] PHP Fatal error: Call to undefined function mp_get_setting() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/marketpress/marketpress.php on line 647
    [19-Dec-2016 22:04:50 UTC] WordPress database error Duplicate key name 'location_type_code' for query ALTER TABLE wp_wuuq_woocommerce_tax_rate_locations ADD KEY location_type_code (location_type(40),location_code(90)) made by do_action('activate_woocommerce/woocommerce.php'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Install::install, WC_Install::create_tables, dbDelta
    [19-Dec-2016 22:04:50 UTC] WordPress database error Duplicate key name 'location_type_code' for query ALTER TABLE wp_wuuq_woocommerce_shipping_zone_locations ADD KEY location_type_code (location_type(40),location_code(90)) made by do_action('activate_woocommerce/woocommerce.php'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Install::install, WC_Install::create_tables, dbDelta
    [19-Dec-2016 22:04:52 UTC] WordPress database error Duplicate key name 'location_type_code' for query ALTER TABLE wp_wuuq_woocommerce_tax_rate_locations ADD KEY location_type_code (location_type(40),location_code(90)) made by do_action('activate_woocommerce/woocommerce.php'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Install::install, WC_Install::create_tables, dbDelta
    [19-Dec-2016 22:04:52 UTC] WordPress database error Duplicate key name 'location_type_code' for query ALTER TABLE wp_wuuq_woocommerce_shipping_zone_locations ADD KEY location_type_code (location_type(40),location_code(90)) made by do_action('activate_woocommerce/woocommerce.php'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Install::install, WC_Install::create_tables, dbDelta
    [22-Dec-2016 17:21:26 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 457
    [22-Dec-2016 17:21:26 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 370
    [22-Dec-2016 17:21:31 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 457
    [22-Dec-2016 17:21:31 UTC] PHP Warning: Invalid argument supplied for foreach() in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/admin/controller/class-unit.php on line 370

  • Luís

    Hi Shannon ,

    Hope you're doing well today!

    Sad to hear the problems you are having.

    Can you please send us the FTP details of your website, so we can investigate further this issue? If yes, please send it privately through our contact form:

    https://premium.wpmudev.org/contact/

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me.

    Send in:

    Subject: "Attn: Luis Lopes"
    - WordPress admin username
    - WordPress admin password
    - Login url
    - FTP credentials (host/username/password)
    - Link back to this thread for reference
    - Any other relevant urls/information

    Cheers, Luís

  • Panos

    Hi Shannon ,

    Thanks for sending information in!

    It seems that some of the methods backbone.js uses (probably PUT or DELETE but not 100% sure yet) are not supported by your server.

    I have made some modifications on file wp-content/plugins/coursepress/2.0/asset/js/coursepress-unitsbuilder.js where I added :
    Backbone.emulateHTTP = true;
    in both function deleteUnit and newUnit and after some tests it seems to be adding and deleting units properly.

    Could you please do some testing and create more courses and units then delete some of them and let us know how it works for you now?

    Thanks!
    Panos

  • Panos

    Hi Shannon ,

    Thanks for reporting this. I have added
    Backbone.emulateHTTP = true;
    before Backbone.sync too, which also uses PUT method ( backbone method "update" uses PUT ) and it seems to be working again.

    Could you please do some tests and let us know how it goes?

    I would also like to suggest to contact your host and ask if it is possible to enable PUT and DELETE methods in case they are not enabled.

    Thanks!
    Panos

  • Shannon

    it works and then it doesn't and here is the line from the debug file

    [27-Dec-2016 19:05:36 UTC] PHP Notice: Trying to get property of non-object in /hermes/bosnaweb01a/b1344/ipg.adventureparagliding/zwp/wp-content/plugins/coursepress/2.0/include/coursepress/template/class-unit.php on line 386

    If I can't get this to work today then I will need to use another lmp software. I am really frustrated!
    It allows me to put in units and then it suddenly decides not to allow me to save units. I just got done doing a unit, I previewed then the course says there's no units. I go back and my units are then gone in my course.