Is there a way to duplicate the units within a course? When

Is there a way to duplicate the units within a course? When you duplicate a course the units do not duplicate as well. Just the overview, etc.

  • Milan
    • WordPress Wizard

    Hello Matthew,

    I hope you are having a good day and thanks for asking us. :slight_smile:

    This is known bug and our developer are already working on it to fix this. Meantime I'm attaching file that should fix the issue with cloning courses. Please replace with it file /coursepress/includes/classes/class.course.unit.php (to be sure make a copy of original file).

    I've tested this and it worked on my site.

    Kind regards,
    Milan

  • Matthew
    • Design Lord, Child of Thor

    Looks like that worked for duplicating the units but now the units page has an error.

    Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /nfs/c05/h04/mnt/71735/domains/astepx.com/html/wp-content/plugins/coursepress/includes/classes/class.course.php on line 374

  • Milan
    • WordPress Wizard

    Hello Matthew,

    I hope you are having a good day and thanks for asking us. :slight_smile:

    I would like to inform you that warning you are getting is not an error actually. :slight_smile: It is just warning and we can disable it by putting this line

    error_reporting(0);

    after this line of "wp-config.php" file which you can find in your site's root folder.

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    So final view of file should look something like this,

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
    
    error_reporting(0);

    This change will hide warning from front end and backend and its safe change. :slight_smile:

    Hope that helps you. Ping me back if you still face that warning on single unit page.
    Best Regards,
    Milan

  • Milan
    • WordPress Wizard

    Hello Matthew ,

    Hope you are well today and thanks for asking us. :slight_smile:

    We have recently released update to CoursePress Pro, but it shows me here that you have not updated your plugin. Is there any special reason of doing so ? If no then please update it as it contains this bug fix already in it.

    Please update your CoursePress Pro via WPMU DEV > Plugins > CoursePress Pro and let me know how it goes. :slight_smile:

    Cheers,
    Milan

  • Matthew
    • Design Lord, Child of Thor

    Milan,

    How can I update the plugin without overwriting the work I did to the theme? I've never seen a theme embedded in a plugin before. Is there a way I can separate the two so I can update the plugin without worrying about the theme? Or is there a partial update I can upload that will not affect the theme?

    Matt

  • Adam Czajczyk
    • Support Gorilla

    Hello Matthew!

    I'm not sure if I'm following you here. If you made changes to the theme that you're using for your site then CoursePress update will not affect those. if you're using a CoursePress theme along the plugin then you must have copied the theme from plugn's folder to "/wp-content/themes" folder in order to be able to use it and again - update wouldn't affect this.

    Have you made any other changes to plugin files? If so, which are they, could you please elaborate a bit on this?

    Best regards,
    Adam

  • Matthew
    • Design Lord, Child of Thor

    I am using the CoursePress theme that is included with the plugin. It has always been in the plugin directory. I did not put it there. I was told in a previous thread that this theme was really the best to use with the plugin. (https://premium.wpmudev.org/forums/topic/page-builder-to-use-with-coursepress). I have updated the plugin before and lost a lot of the work because the theme files are located in this directory….

    /wp-content/plugins/coursepress/themes/

    I have also edited some files in the templates directory.

    /wp-content/plugins/includes/templates/

    Please advise.
    Matt

  • Adam Czajczyk
    • Support Gorilla

    Hello Matthew!

    The files in "/wp-content/plugins/coursepress/themes" shouldn't be updated along the plugin update but those in "/wp-content/plugins/coursepres/includes/templates".

    l think however that these files were not changed (nor were the theme files) so the following procedure should work:

    1. Download all the files and folders from "/wp-content/plugins/coursepress/includes/templates" directory
    2. Update the plugin
    3. Upload those files and folder back to the server.

    Let me please however make sure about it by asking one of our developers. Please keep an eye on this thread and I'll update it as soon as I get a replay.

    Best regards,
    Adam

  • Matthew
    • Design Lord, Child of Thor

    Any update from your developers on if this is the best course of action? Also, would you recommend I backup the site with your Snapshot plugin? With this, I'm I guaranteed to be able to restore to a previous build? How does this work?

    Best,
    Matt

  • Adam Czajczyk
    • Support Gorilla

    Hello Matt!

    It seems that what I suggested in my previous thread would be the best course of action here. A full backup is however strongly suggested and yes - the Snapshot Pro plugin would do the job here.

    The usage guide for the plugin is available at an URL below and I believe it explains the procedure much better than I'd be able to explain in a few sentences here on forum :slight_smile:

    https://premium.wpmudev.org/project/snapshot/

    This article on our blog also explains in details how to backup site:

    https://premium.wpmudev.org/blog/backup-with-snapshot/

    Best regards,
    Adam

  • Matthew
    • Design Lord, Child of Thor

    Adam,

    I updated CoursePress per you instructions and everything seems to be okay. However, the site is still extremely slow. This has been a huge problem for months now. I would be willing to move the site to a new server if that's the solution. Are there any hosting companies you can recommend? I was thinking of switching to Blue Host. Can someone login to my site to diagnose the issue?

    Matt

  • Matthew
    • Design Lord, Child of Thor

    Milan,

    Some of these posts are helpful but I'm really interested in knowing what servers work well with CoursePress. I'm not having many issues with WordPress. If you could, simply suggest a company that you have seen work well for other clients using CoursePress or provide specifications for a compatible server. I could chose to change the plan I have with MediaTemple or go to a different company.

    Matt

    Matt

  • Adam Czajczyk
    • Support Gorilla

    Hello Matthew!

    I understand your point but please understand that it's very difficult for us to give you a conclusive recommendations here. It's not because we do not want to but mostly because it's not just related to the "CoursePress requirements". CoursePress is a WP plugin and not an "individual being" and as such is a part of an entire "ecosystem" that includes WordPress itself, theme and other plugins.

    Furthermore, exactly the same setup on the same server may behave in slightly different way depending even on content the site includes and on current settings of various plugins.

    Having said that, I suggest that you post a question for recommendation on our community forums where other members of WPMU DEV community may share their experience with you:

    https://premium.wpmudev.org/forums/forum/members

    If you wish me however, I'd be more than happy to review your site on a current server and try to identify what's slowing it down the most. I'd prefer not to give you any guarantee at this point but it's possible that I may be able to help a bit here. Let me know please what do you think about it.

    Best regards,
    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hello Matthew!

    I reviewed your site and I've got some suggestions for you regarding its performance. I think it would be beneficial if you applied them regardless whether you decide to go for other hosting or stay with your current one. For your convenience I'm posting them as a numbered list below :slight_smile:

    1. Increase WP memory limit

    The current limit for PHP scripts (and WP is written in PHP) is 256M but your site is not able to make use of it since your WP install is limited to 40M which is extremely small amount. Therefore please add following line to your site's "wp-config.php" file:

    define('WP_MEMORY_LIMIT','256M');

    This line should be placed above the "/*That's all, stop editing..." line.

    2. Update PHP version

    Your server is currently running 5.5.31 version of PHP. That's not bad but I'd suggest switching to at least 5.6.19 but if it's available it could be 7.x.

    Usually, server user is able to make such change via cPanel so please take a look if there's an option that would let you change PHP version. If not, you may want to get in touch with your hosting provider and ask them if they could upgrade it for you. This will not give any significant performance "boost" but together with other "tweaks" will add up to performance improvement.

    3. Plugins

    I think it would be good to remove all the plugins that you're not using and are not planning to use any time soon (even though there's not many of them).

    4. Image optimization

    There's not many images on your site and they doesn't seem to be "heavy" so this is optional but anyway I'd give WP Smush Pro a try. It will optimize existing images, taking off from the amount of data that needs to be transfered to the user browser:

    https://premium.wpmudev.org/project/wp-smush-pro/

    Once all this is applied let me know and I'll review the site again and also help you "fine tune" Hummingbird and WP Super Cache and we'll then be able to test and assess performance once again. It will then show whether moving the site to other server would be beneficial or wouldn't make much difference.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.