[CoursePress Pro] HTML Displaying in unit view

I have my content set up with the [one-half][/one-half] brackets. But when viewing the page initially either as an admin or a student it shows them. If I refresh the page it displays correctly.

I deleted cache already and tried to deactivate asset optimization in hummingbird as recommended to me by Dimitris in another thread. Neither worked to clear the issue.

  • Kasia Swiderska
    • Support nomad

    Hello Eric,

    I apologize that this is not working correctly on your site.

    Just to make sure - even when you disabled Humminbird's Assets Optimization it was still working incorrectly?
    I can see there are some JS errors in browser console, but those should not affect how shortcodes are rendering as this happens on the PHP level.
    So we would need to check if there are any PHP error or warnings that would point us why this is happening. We can do that by enabling debug.log in your WordPress.
    To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

    define('WP_DEBUG', true);

    In order to enable the error logging to a file on the server you need to add yet one more similar line:

    define( 'WP_DEBUG_LOG', true );

    In this case the errors will be saved to a debug.log log file inside the /wp-content/directory.

    Depending on whether you want your errors to be only logged or also displayed on the screen you should also have this line there, immediately after the line mentioned above:

    define( 'WP_DEBUG_DISPLAY', false );

    The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.

    If you open wp-config.php and that define statement is not there, you can add it right before this line:

    /* That's all, stop editing! Happy blogging. */

    After that - go through a couple of units and then see the debug.log in wp-content. Upload it to service like Dropbox and then send a link to us to check it.

    kind regards,

  • Eric Johnson
    • The Incredible Code Injector

    I had nothing minified in hummingbird. I disabled it and then went through the course again...no change.

    I've had my debug log turned on for a while. I consolidated the last file and started with a new one for you. But, going through the course isn't generating a new file. So, no errors?

    And, I tried the course in FireFox and I had the same issue.

    But, again, if I refresh the browser it displays the page correctly.

    Also, just so I can understand what I'm talking about...Those brackets are containing shortcodes (i.e. [one-half][/one-half])?

    Here's a link to my old log just incase that may show something:

    Debug Log

  • Kasia Swiderska
    • Support nomad

    Hello Eric,

    I don't see anything relevant inside that debug.log - I did some tests on my test site with Divi theme as well, but those [one-half][/one-half] are working in course units correctly.

    However, I have an older version of the Divi theme, so that is why it works on my site.

    For further investigation, I will need FTP access to your site. Also, is it possible you could update Divi to the latest version?

    Note: Don't leave your login details in this ticket.
    Instead, you can send us your details using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question and the template below:

    Subject: "Attn: Kasia Swiderska"
    - Site login URL
    - WordPress admin username
    - WordPress admin password
    - FTP credentials (host/username/password)
    - Folder path to site in question
    - Link back to this thread for reference
    - Any other relevant urls/info

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.

    Please confirm here that you send those credentials

    kind regards,

  • Eric Johnson
    • The Incredible Code Injector

    I've sent the info requested

    Thank You!

    P.s. I'm currently having new issues with my css. It stopped being loaded by browsers. I've done the basic tests - plugin/theme conflict. Can't figure it out. It was working fine, but then just stopped. loading it. But, weirdly, some does show. I'll start a new support ticket for this.

  • Kasia Swiderska
    • Support nomad

    Hello Eric,

    Thank for the access - I was able to replicate the same issue with only Divi and CoursePress installed on my lab site. I also got the latest version of Divi and this issue is still present.
    I also tried switching PHP version on my server and there was no difference, also nothing relevant was showing in the debug.log. I also have all server cache disabled for this site, so it isn't the culprit.

    I'm escalating this to our Second Line Support developers for further investigation - I haven't found similar reports so far for this combination. I will keep you posted.

    kind regards,

  • Konstantinos Xenos
    • Rubber Duck Debugger

    Hi Eric Johnson and sorry for the late reply !

    Could you try by adding this code into your functions.php ( preferably your child themes ) and tell me if it works for you? I tested it on my setups and it's working fine but there might be some differences between environments.

    add_action( 'wp_footer', 'cp_divi_redirects' );
    function cp_divi_redirects() {
    	$module = get_query_var( 'module_id' );
    	if ( ! empty( $module ) ) {
    			( function( $ ) {
    				$( document ).ready( function() {
    					$( 'form.cp-form button.focus-nav-prev, form.cp-form button.focus-nav-next' ).on( 'click', function(e) {
    						var red_url = $( this ).data('url');
    						window.location.href = red_url;
    			} ( jQuery ) );
    		$script = ob_get_clean();
    		echo $script;


  • Eric Johnson
    • The Incredible Code Injector

    Thanks Konstantinos!

    It's almost there.

    Apparently it is only applying that code to the first page in each unit. Every subsequent page is back to the shortcodes displaying.

    To add, I just found that if I am on a page and it displays the shortcodes and then click back to the previous page using the "previous" button, and then back forward using the "next" button, it then displays the page correctly without the shortcodes showing.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.