• Resolved bgfrancey

    (@bgfrancey)


    Hello,

    I have a client who is using mDocs on their site and have two issues at the moment relating mainly to the description of the docs.

    The site is https://pact.ca/contracts-resources/

    The description of the files does not show up when they are clicked on in the dropdown menu. This was an issue we had before. It did work at one time, but there was about a 5 second lag on having the description actually show up.

    On the file page itself, there is not information being displayed: https://pact.ca/mdocs-posts/2015-2018-canadian-theatre-agreement-fee-booklet/

    And lastly, when a member logs in to download a file, they are directed to the description page above and there is no option to download the file.

    Any help you can provide for these issues would be great.

    Thanks,
    Blair

Viewing 15 replies - 1 through 15 (of 30 total)
  • Plugin Author bhaldie

    (@bhaldie)

    sounds like the ajax issue is getting worst. Now when I look at your code you are getting a 500 error.

    First try this Mdocs Dashboard > Options > Settings > and check “Disable Session Data”

    You can also have a look at this site they have detail information on steps to take if you are getting this error.

    https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-internal-server-error-in-wordpress/

    As for the download button, can you provide me with a screenshot of your mdocs settings it would be helpful for deb

    • This reply was modified 7 years, 3 months ago by bhaldie.
    Thread Starter bgfrancey

    (@bgfrancey)

    Thanks for getting back to me.

    I tried the “Disable Session Data” and it didn’t seem to do anything. I’ll look into the link you included and let you know if that works.

    I have a screenshot of the settings for you to look at here: https://cloud.bfdesign.ca/2X1m3l2B2p1a

    Plugin Author bhaldie

    (@bhaldie)

    your setting don’t look unusual, I think your 500 error maybe playing a part with this issue.

    Thread Starter bgfrancey

    (@bgfrancey)

    Hi again –
    Just checking to see if you’d had a chance to look into the download button issue and also why the description might not be showing up on the internal page for the file?

    I also just noticed that the internal page (ie. https://pact.ca/mdocs-posts/2017-2020-pact-pgc-commission-contract/) shows as Memphis Documents Posts – is there some way to change this to the title of the document or something else that relates to the page it was being downloaded from, such as Contracts & Resources?

    I’m going to check in with the server people to see what’s up with the 500 error.

    Thanks.

    Plugin Author bhaldie

    (@bhaldie)

    Hi,

    I am still at a lose as to what maybe causing the button not to show up… but looking at your site its not just the button that is missing. You are missing all of the top portion of the page e.g. The file name share button and download button.

    Something is causing that whole top area to stop loading.. I will have to look at that part of my code in more detail. I may need you to alter some files to test some things for me.

    Thread Starter bgfrancey

    (@bgfrancey)

    Hi there,

    I was able to clone the site and test it with all other plugins disabled and the problem persisted. I contacted my server host and asked them about the 500 error but they couldn’t see anything on their end.

    Have you had a chance to look at this yet?

    Thanks.

    Plugin Author bhaldie

    (@bhaldie)

    I was going to take a look tomorrow, and see what I could find.. I may need you to test some code on your test site to see if we can narrow the issue down.

    Thread Starter bgfrancey

    (@bgfrancey)

    Happy to help out however I can!

    Plugin Author bhaldie

    (@bhaldie)

    try this open the file mdocs-post-page.php and find this line:

    
    else $read_private_posts = false;
    

    and add this underneath that line:

    
    $read_private_posts = true;
    $the_mdoc['post_status'] = 'publish';
    

    see if you can see anything… let me know when you change it and I will have a look at your site.

    Thread Starter bgfrancey

    (@bgfrancey)

    I added the line and it broke the site – wasn’t able to load it at all.

    Plugin Author bhaldie

    (@bhaldie)

    that shouldn’t have broken anything… I just set the 2 variables to a set value for testing… make sure your code looks like this:

    
    else $read_private_posts = false;
    $read_private_posts = true;
    $the_mdoc['post_status'] = 'publish';
    
    Thread Starter bgfrancey

    (@bgfrancey)

    Seems to have worked this time. Still didn’t seem to help though – here’s a screencast of what it looks like: https://cloud.bfdesign.ca/2a403Q3z0C0A

    Plugin Author bhaldie

    (@bhaldie)

    I am focusing more on the post page right now… goto one of the mdocs files post pages and take a screenshot for me.

    Thread Starter bgfrancey

    (@bgfrancey)

    Plugin Author bhaldie

    (@bhaldie)

    Okay… that is a step in the right direction for this part. Can you see how the title of the file is being displayed.

    Now lets see if we can get the download button to show up.

    same file change this code:

    
    if($mdocs_hide_all_files || $the_mdoc['file_status'] == 'hidden') { ?><div class="mdocs-login-msg btn btn-primary"><small><?php _e('This file can not<br>be downloaded.','memphis-documents-library'); ?></small></div><?php }
    		else if($mdocs_show_non_members  == 'off' && $user_logged_in == false || $user_logged_in == false && $mdocs_hide_all_files_non_members) { ?>
    			<a class="mdocs-download-btn btn btn-primary" href="<?php echo wp_login_url($permalink); ?>" ><small><?php echo __('Please Login to download this file','memphis-documents-library'); ?></small></a>
    		<?php } elseif($the_mdoc['non_members'] == 'on' || $user_logged_in ) { ?>
    			<input type="button" onclick="mdocs_download_file('<?php echo $the_mdoc['id']; ?>','<?php  echo $the_post->ID; ?>');" class="mdocs-download-btn btn btn-primary" value="<?php echo __('Download','memphis-documents-library'); ?>">
    		<?php } else { ?>
    			<a class="mdocs-download-btn btn btn-primary" href="<?php echo wp_login_url($permalink); ?>" ><small><?php echo __('Please Login to download this file','memphis-documents-library'); ?></small></a>
    

    to this:

    
    ?><input type="button" onclick="mdocs_download_file('<?php echo $the_mdoc['id']; ?>','<?php  echo $the_post->ID; ?>');" class="mdocs-download-btn btn btn-primary" value="<?php echo __('Download','memphis-documents-library'); ?>">
    
Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘Issue with Description and file page’ is closed to new replies.