Viewing 15 replies - 31 through 45 (of 60 total)
  • Plugin Author bhaldie

    (@bhaldie)

    Have you disabled the preview button?

    I have now as it was not formatting properly. It was loading behind the main nav bar.

    Plugin Author bhaldie

    (@bhaldie)

    can you turn it on for testing?

    Done.

    Thanks for this.

    Plugin Author bhaldie

    (@bhaldie)

    looks like you have disable mdocs js file. You need this file for mDocs to run properly.

    Please enable that file again.

    I haven’t disabled anything. The only thing I have done is insert this piece of code into the functions.php as per a previous post. This makes it work but with the preview issue.

    $handle = ‘bootstrap.min.js’;
    $list = ‘enqueued’;
    if (wp_script_is( $handle, $list )) { return; }
    else {
    wp_register_style( ‘bootstrap-style’, ‘//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css’);
    wp_enqueue_style( ‘bootstrap-style’ );
    wp_register_script( ‘bootstrap.min.js’, ‘//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js’);
    wp_enqueue_script( ‘bootstrap.min.js’ );
    }

    Plugin Author bhaldie

    (@bhaldie)

    I just looked at your site again mdocs-scripts.js is not loaded so something has been changed.

    remove the code you added to the function.php file and let me know when you did.

    Code has been removed from Functions.php

    Plugin Author bhaldie

    (@bhaldie)

    to fix one issue the modal being under the nav bar open your themes style.css file and edit these lines:

    nav.navbar-default {
    	background-color: #fff;
    	border: 0;
    	border-radius: 0px;
    	margin-bottom: 0;
    	-webkit-animation-duration: 0.6s!important;
    	z-index: 55555;
    	border-bottom: 1px solid rgba(0,0,0,0.08);
    	box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.08);
    }

    to this

    nav.navbar-default {
    	background-color: #fff;
    	border: 0;
    	border-radius: 0px;
    	margin-bottom: 0;
    	-webkit-animation-duration: 0.6s!important;
    	z-index: 99;
    	border-bottom: 1px solid rgba(0,0,0,0.08);
    	box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.08);
    }
    Plugin Author bhaldie

    (@bhaldie)

    Next we need to do some debugging, to see why mdocs-scripts.js is not loading.

    Open the files mdocs-settings.php:

    add this under this line around line 400:

    if(isset($post)) {
          var_dump($post);

    let me know what happens.

    When i add the last bit it gives me lots of errors at the top
    object(WP_Post)#3048 (24) { ["ID"]=> int(214) ["post_author"]=> string(1) "2" ["post_date"]=> string(19) "2015-05-08 15:24:27" ["post_date_gmt"]=> string(19) "2015-05-08 14:24:27" ["post_content"]=> string(22) "[mdocs cat="Policies"]" ["post_title"]=> string(15) "School Policies" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(6) "closed" ["ping_status"]=> string(6) "closed" ["post_password"]=> string(0) "" ["post_name"]=> string(15) "school-policies" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2015-05-08 15:24:27" ["post_modified_gmt"]=> string(19) "2015-05-08 14:24:27" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(211) ["guid"]=> string(33) "https://new.gw-hs.org/?page_id=214" ["menu_order"]=> int(0) ["post_type"]=> string(4) "page" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }

    I added it to line 399 and it now doesn’t show the errors.

    However since removing the code from functions.php, the menu does not pop up when you click a document, so i am unable to try the preview.

    Plugin Author bhaldie

    (@bhaldie)

    its not errors its data,

    now add it to line 401

    if(isset($post)) {
    		if(get_post_type($post) == 'mdocs-posts' || has_shortcode( $post->post_content, 'mdocs' ) || is_home()) {
      var_dump('test');

    When i put

    if(isset($post)) {
          var_dump($post);

    It also kills the site.

    https://www.gw-hs.org

    Plugin Author bhaldie

    (@bhaldie)

    its not killing anything, its just outputting data, I changed it to a single string so not to freak you out more.

    var_dump('test');

Viewing 15 replies - 31 through 45 (of 60 total)
  • The topic ‘Preview and download button doesn't work’ is closed to new replies.