• Files popup options not showing for custom user profile with just read rights (https://prntscr.com/gy2cqe). The page to access the Memphis interface is restricted to the same profile. It was working a few weeks ago!

    If I change the privileges of that user to admin it works.

    Any ideas to solve it?

    Thanks,

    Pedro

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

    (@bhaldie)

    Try this if it works I will add this code to the next version of mDocs.

    Open up the file mdocs-post-page.php and goto line 108:

    
    mdocs_social_scripts();
    

    and change it to:

    
    if($the_mdoc['show_social'] ==='on' && get_option('mdocs-show-social') ) mdocs_social_scripts();
    
    Thread Starter Pedro Cavaco Henriques

    (@pchenriques)

    Hi, bhaldie

    It’s better but but something is still missing. Look here to see the output: https://www.ceb-solutions.com/mdocs-posts/

    Suggestions?

    Thx

    Plugin Author bhaldie

    (@bhaldie)

    yes I see… its your theme it is converted all html to plain text, I can’t do anything about that you will have to ask the theme developer why they are doing that.

    Thread Starter Pedro Cavaco Henriques

    (@pchenriques)

    I’m testing W3 Total Cache (https://www.ads-software.com/plugins/w3-total-cache/) could it be some optimization done by it?

    I will contact the theme developer.

    Thx

    Plugin Author bhaldie

    (@bhaldie)

    its possible, try disabling it and see what happens. I would suggest disabling all plugins and see if the problem is fixed. Then enable 1 plugin at a time until the error returns.

    Thread Starter Pedro Cavaco Henriques

    (@pchenriques)

    Ok, I’ll try that too.

    Thread Starter Pedro Cavaco Henriques

    (@pchenriques)

    Hi, bhaldie

    The issue seem to be related with how WordPress deals with excerpts. From the theme side it is configured to show a except of 30 characters on archive and search posts results, which make sense instead of full posts (same problem on search results: https://www.ceb-solutions.com/?s=product+description&lang=en).

    Couldn’t it be managed from the plugin side? It seams that if there is no description the excerpt is collecting from somewhere else.

    Thanks,

    Pedro

    Plugin Author bhaldie

    (@bhaldie)

    If there is no excerpt specified WordPress will take the first 55 characters from the post itself.

    But the issue is still that the theme is converting the html into plain text. The normal function the_excerpt() will display html content as normal.

    Is the theme you are using free, if so provide me the link.

    Thread Starter Pedro Cavaco Henriques

    (@pchenriques)

    It’s a paid theme from https://us-themes.com/ called Impreza. Demo version: https://impreza.us-themes.com/

    The explanation I wrote above is from theme support.

    I’ll get back to theme support with your comments.

    Thread Starter Pedro Cavaco Henriques

    (@pchenriques)

    Hi, bhaldie

    I quote the theme developer comments about your latest post:

    “Yes, our framework uses get_the_excerpt() function instead, which strips tags and shortcodes to avoid corrupting layouts, because raw HTML from excerpts can break it. For some reason this filter doesn’t work with your plugin content. I tried to override this function in child theme but it works only for WordPress posts, not for these posts, please ask developers of your plugin to fix this issue. I tried next code, it can help them to investigate the issue:

    function child_get_the_excerpt($text) {
     $raw_excerpt = $text;
     if ( '' == $text ) {
            $text = get_the_content('');
            $text = strip_shortcodes( $text );
            $text = apply_filters('the_content', $text);
            $text = str_replace(']]>', ']]>', $text);
            $allowed_tags = '';
            $text = strip_tags($text, $allowed_tags);
            $excerpt_word_count = 15;
            $excerpt_length = apply_filters('excerpt_length', $excerpt_word_count);
            $excerpt_end = '[...]';
            $excerpt_more = apply_filters('excerpt_more', ' ' . $excerpt_end);
            $words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);
            if ( count($words) > $excerpt_length ) {
                array_pop($words);
                $text = implode(' ', $words);
                $text = $text . $excerpt_more;
            } else {
                $text = implode(' ', $words);
            }
     }
     return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
    }
    add_filter('get_the_excerpt', 'child_get_the_excerpt', 5);

    Can you help?

    Thanks,

    Pedro

    Plugin Author bhaldie

    (@bhaldie)

    this solution will show nothing.

    mDocs uses a shortcode on it post page to generate the html content. If I strip the all tags and shortcode the result will be the post title and blank.

    Unfortunately if the developer of your theme is using this methodology there is not much I and you can do to get content outputted, without the shortcode mdocs uses the result is null.

    Thread Starter Pedro Cavaco Henriques

    (@pchenriques)

    And complementing with additional quote from theme developer:

    “This function should work for all post types (including custom posts) without limitations, most probably this issue related to your plugin.”

    Thanks,

    Pedro

    Plugin Author bhaldie

    (@bhaldie)

    I’ll take a look

    • This reply was modified 7 years, 1 month ago by bhaldie.
    Thread Starter Pedro Cavaco Henriques

    (@pchenriques)

    Thanks, bhaldie

    If I understood it right (and I’m not a developer…) generally speaking you are saying that you use the default post of the theme stripped from sidebar and some other features to produce a custom post where you add a shortcode for the content and produce the final output? If that would be the case the behaviour of these custom posts would have to be similar besides the html content, right? Just asking because of a favicon issue that we are having with posts and pages with Memphis publications. Just post it on another topic: https://www.ads-software.com/support/topic/favicon-issue-breaking-https/

    Let me know if I can help,

    Pedro

    Plugin Author bhaldie

    (@bhaldie)

    Not really, the custom post is created yes but inside that custom post is only a shortcode which is this [mdocs_post_page new=true]. When wordpress sees that shortcode it know to run a certain function inside mDocs that will produce the content you see on a mDocs post page.

    So the solution the theme author has will remove the shortcode from the mDocs post page which will result in a page that is blank.

    I hope this makes it more clear.

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘Files popup options not showing for custom user profile’ is closed to new replies.