• Resolved tgray10

    (@tgray10)


    hello – the plugin loaded fine, I figured out the configuration, the button shows up on my blog post pages to PDF the article, but two things…

    1. How do I change the hover color for the button? I changed the regular colors, but can’t figure out the hover.

    2. When I click the PDF button, it kicks me back to the home page. No PDF. What do I have configured wrong?

    Thanks! ??

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Michael Nelson

    (@mnelson4)

    Hi @tgray10! Nice to digitally meet you!
    1. Similar to what’s described on https://www.ads-software.com/plugins/print-my-blog/#how%20do%20i%20change%20the%20color%20of%20the%20print%20buttons%3F, this CSS should work:

    
    div.pmb-print-this-page a:hover{
    color:black;
    background-color:white;
    }
    

    Here’s some more info about the hover CSS selector: https://www.w3schools.com/cssref/sel_hover.asp

    2. I’m guessing your site is doing some sort of redirect.
    For example, on this post https://printmy.blog/2021/04/02/transparency-report-of-march-2021/ I have print buttons. They link to here: https://printmy.blog/?print-my-blog=1&post-type=post&statuses%5B0%5D=publish&rendering_wait=0&include_inline_js=1&shortcodes=1&columns=1&font_size=normal&image_size=medium&links=include&show_site_title=1&show_site_tagline=1&show_site_url=1&show_date_printed=1&show_title=1&show_date=1&show_categories=1&show_featured_image=1&show_content=1&format=pdf&pmb-post=5308 which is actually the homepage with a bunch of special information tacked onto the “query string” (everything after the question mark) that says which post to print, instead of showing the home page. It sounds like some plugin, server setting, or .htaccess file setting is removing the query string. Do you have a guess about which one it is? If not, can you share the list of active plugins?

    Thread Starter tgray10

    (@tgray10)

    Hi Michael!

    Thanks for such a quick reply! Really appreciate it. My apologies for missing the reference to the coding for the hover function. That did the trick, looks just as I would like.

    As for the other…ugh. Still no luck. I’ve deactivated most of the plug-ins one at time, with no change in outcome. I don’t know what would be causing the problem. Here is the list of what is running for plug-ins

    Akismet
    Classic Editor
    iubenda cookie and consent solution
    insert headers & footers
    print my blog
    short pixel image optimizer
    Thrive Architect
    Thrive Comments
    Thrive Product Manager
    Wordfence security
    WP Fastest Cache
    WP Legal Pages
    WP Legal Pages Pro

    Installed but not activated:
    Advanced Sidebar Menus
    All-in-one WP migration
    Wishlist member

    I have a dedicated server but I don’t know a lot about how to run it. If there is some setting there I should check, let me know and I can figure it out.

    Thanks so much for your help! Teresa ??

    Plugin Author Michael Nelson

    (@mnelson4)

    Hmmm thanks for the plugin list. I’m most suspicious of Thrive Architect (although I can’t test it as it’s a paid plugin) as it’s probably overriding WordPress’ templating system which Print My Blog also overrides. Have you tried temporarily deactivating that one?

    Also, what is the URL you are taken to for print my blog? (I know it’s not web accessible, but I’m wanting to know if you’re being redirected or what.)

    Thread Starter tgray10

    (@tgray10)

    I did deactivate Architect – no difference.

    Here is the url that it goes to (or was going to):

    https://momwithme.net/?print-my-blog=1&post-type=post&statuses%5B0%5D=publish&rendering_wait=0&columns=1&font_size=normal&image_size=medium&links=include&show_site_title=1&show_site_tagline=1&show_site_url=1&show_date_printed=1&show_title=1&show_date=1&show_categories=1&show_featured_image=1&show_content=1&format=pdf&pmb-post=173

    That said I have now somehow broken the site. I was trying to remove the login page I have set as the homepage so the site would function as intended and you could see what is going on. I also created a guest user account in case you want to muck around in the back end. But now the site will not display. I get this error page:

    This page isn’t working.
    momwithme.net is currently unable to handle this request.
    HTTP error 500

    I’m sure it’s a conflict with a plug-in and some setting I have, or something about the real homepage that is causing the problem. I’ve reset everything I can think of, cleared caches, switched pages, deactivated and reactivated plugins. I just don’t know enough to know where else to look. Arg.

    Also, somehow, my cpanel accounts on my server also got mucked up and I can’t access those either. My hosting company is sorting that out.

    Fun fun fun!! ??

    Thread Starter tgray10

    (@tgray10)

    okay! Back in biz – all issues (that I know of, lol…) are resolved and you can now see the site live – it is now jumping to the correct homepage. Still no pdf, but at least the right homepage is showing up! Lol. ??

    Plugin Author Michael Nelson

    (@mnelson4)

    HI @tgray10 sorry to hear you’ve had trouble! Ya sorry but figuring out which plugin is conflicting can be a pain (my upcoming version will avoid this problem by using a dedicated page…)

    I’m surprised that deactivating each of the other plugins individually didn’t solve it. It’s possible it’s a server setup issue, but I’m still suspicious it’s a plugin issue.

    It’s against www.ads-software.com support forum policies for me to accept login credentials to your site from here, sorry.

    The next step I’d suggest would be to figure out if any other plugins are using the same “template_include” filter as Print My Blog. TO do that you would need:
    1. Install and ctivate the Debug Bar plugin: https://www.ads-software.com/plugins/debug-bar/
    2. Install and activate the Debug Bar Actions and Filters Addon: https://www.ads-software.com/plugins/debug-bar-actions-and-filters-addon/
    3. Visit your homepage
    4. In the top-right of the page you will see a new “Debug” link, click it
    5. On the left, click “Filter Hooks”
    6. Search for “template_include” and take a screenshot of what you see and paste it into here (eg I use a program named ShareX for sharing screenshots but there are lots out there)

    I made a video explaining that here: https://drive.google.com/file/d/1vSYx2yCfXExrOf-FY9ELegvwWyZsySAh/view

    Hopefully that will reveal some more clues!

    Thread Starter tgray10

    (@tgray10)

    Lol! I’m actually loving this…I like to learn new things about this stuff, so having to do some of this myself is awesome! Thank you!

    I’ll work on this and get a screenshot for you as quick as possible. If worse comes to worst, you could email the site at admin@…that will get to me.

    Stand by…working!

    ??

    Thread Starter tgray10

    (@tgray10)

    I must be the most unfavored child of wordpress ever – it will not let me paste a screen shot here.

    here is what it says:

    template_include 20001 [object]PrintMyBlog\controllers\PmbPrintPage->
    templateRedirect

    That’s it, that’s all it says. ??

    Plugin Author Michael Nelson

    (@mnelson4)

    And that’s from the homepage right? That’s disappointing…
    I think the next step is to just try deactivating all other plugins and see if the problem goes away. If it still doesn’t work then it must be a problem with my plugin or your hosting setup.

    Thread Starter tgray10

    (@tgray10)

    Yep, that was for the homepage.

    And yep, I deactivated everything but your plug-in and still got the same result.

    I have my own dedicated server, so is there something I can go check or tweak to make it work?

    Plugin Author Michael Nelson

    (@mnelson4)

    Thanks for confirming… so weird… I’m going to make a version of the plugin that will temporarily spit out a lot of debugging information which will hopefully give a better clue what’s going wrong. Hopefully today but maybe Monday.

    Thread Starter tgray10

    (@tgray10)

    Sounds great, no worries, this isn’t a rush deal. Thanks so much for all the help! I really want this to work! ??

    Plugin Author Michael Nelson

    (@mnelson4)

    Hi @tgray10, ok I’ve made a version that outputs a lot of debug info in HTML comments. Depending on your server setup this may interfere with redirects, but we should only need this active for a little while in order to figure out what’s going wrong.
    Here’s how to download and try this new version:
    1. Download the new version from here: https://github.com/mnelson4/printmyblog/archive/refs/heads/BUG/debugging-code.zip
    2. Go to your WordPress dashboard, click plugins, then “add new”, then “upload” and select the zip file you just downloaded
    3. Deactivate the previous version Print My Blog
    4. Activate the new version of Print My Blog

    Please let me know once you have it active on the site, then I can take a look at the hidden debugging info.

    Thread Starter tgray10

    (@tgray10)

    Done! ??

    Plugin Author Michael Nelson

    (@mnelson4)

    Thanks @tgray10.
    Ok it appears that somehow the hook template_include isn’t getting fired, which is where Print My Blog swaps out the homepage for its “print page”.
    That must be done by a plugin, and I’m still very suspicious of Thrive Architect (other page builder plugins have had similar issues). I’m contacting them to see if I can get a copy of the plugin for testing (sometimes plugin authors are receptive to this, sometimes they aren’t.)
    Would you mind temporarily deactivating all other plugins on the site? If the problem’s with my plugin I’d like to remove any possibility of another plugin mixing things up and making the situation more confusing.
    But if you’d like to just go with another plugin for now (eg Print Friendly) I wouldn’t blame you. Debugging issues like this, while respecting the wp.org rules, can be tough

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘PDF button goes to home page’ is closed to new replies.