Title: farnely's Replies | WordPress.org

---

# farnely

  [  ](https://wordpress.org/support/users/farnely/)

 *   [Profile](https://wordpress.org/support/users/farnely/)
 *   [Topics Started](https://wordpress.org/support/users/farnely/topics/)
 *   [Replies Created](https://wordpress.org/support/users/farnely/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/farnely/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/farnely/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/farnely/engagements/)
 *   [Favorites](https://wordpress.org/support/users/farnely/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 43 total)

1 [2](https://wordpress.org/support/users/farnely/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/farnely/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/farnely/replies/page/2/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Content Security Policy Issues](https://wordpress.org/support/topic/content-security-policy-issues-3/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/content-security-policy-issues-3/#post-18768815)
 * [@mehrazmorshed](https://wordpress.org/support/users/mehrazmorshed/)
 * Oddly, I had tried adding the hashes from devtools but they didn’t work. I wondered
   if perhaps a mixture of hashes and nonces wouldn’t work. I’ve tried it again 
   today and now it works!! I must have made a mistake somewhere in my pasting.
 * So relieved :-). Many thanks!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Speculation Rules Script & Googlebot](https://wordpress.org/support/topic/speculation-rules-script-googlebot/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/speculation-rules-script-googlebot/#post-18768270)
 * The entries in my robots file relating to Google have remained (rightly or wrongly)
   unchanged for years but now, since WP 6.8 was released in April, Google has got
   the idea that (taking the first item in the list) the URL _[https://my-site/wp-*.php](https://my-site/wp-*.php)_
   exists when it doesn’t, hence the 404s. The only place wp-*.php appears is in
   the speculation rules script that loads since WP 6.8.
 * Excluding those paths in robots would be a request to not crawl any of those 
   locations. In other words, “don’t crawl my site”.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[iQ Block Country] PHP Deprecated V1.2.26](https://wordpress.org/support/topic/php-deprecated-v1-2-26/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [10 months, 3 weeks ago](https://wordpress.org/support/topic/php-deprecated-v1-2-26/#post-18610876)
 * Any chance of an update please?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[iQ Block Country] PHP Deprecated V1.2.26](https://wordpress.org/support/topic/php-deprecated-v1-2-26/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/php-deprecated-v1-2-26/#post-18592650)
 * Yes it’s 157.15.90.216. According to [https://www.iplocation.net/ip-lookup](https://www.iplocation.net/ip-lookup),
   it’s in India.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[iQ Block Country] PHP Deprecate](https://wordpress.org/support/topic/php-deprecate/)
 *  [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [11 months, 3 weeks ago](https://wordpress.org/support/topic/php-deprecate/#post-18570372)
 * PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of
   type string is deprecated in /wp-content/plugins/iq-block-country/libs/blockcountry-
   checks.php on line 19
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Question about template_redirect hook](https://wordpress.org/support/topic/question-about-template_redirect-hook/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/question-about-template_redirect-hook/#post-18401167)
 * I use a third party plugin for custom posts and fields so I don’t know what hook
   is used.
 * I’m of the opinion, however, that the custom post type must be registered by 
   the time the template_redirect hook runs because if I change the post status 
   to publish, a 404 is not returned and the content template loads. I think that
   when the post status is private, the post is considered non-existent for a logged
   out user and logically you can’t fetch the post type for a non-existent post.
 * Working with private posts in wordpress is cumbersome!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Question about template_redirect hook](https://wordpress.org/support/topic/question-about-template_redirect-hook/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/question-about-template_redirect-hook/#post-18400650)
 * [@threadi](https://wordpress.org/support/users/threadi/)
    Thanks for your suggestions.
   Am using paths, private browser produced same result and is_user_logged_in() 
   returns correct status on 404 page.
 * Have been trying out a few more things and managed to solve it by updating my
   template_redirect hook to redirect if is_404(), user not logged in and the requested
   post exists. Narrowing it down any further (to specific custom post types, for
   example) returns the unwanted 404 again.
 * This is as close as I can get to what I was trying to achieve so am closing thread.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Weather Atlas Widget] Undefined Variable Error (Version 3.0)](https://wordpress.org/support/topic/undefined-variable-error-version-3-0/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/undefined-variable-error-version-3-0/#post-17735896)
 * [@quantum-leap](https://wordpress.org/support/users/quantum-leap/)
    This isn’t
   the first time the developer/s have released a version containing basic coding
   errors and I doubt it will be the last. I got fed up of waiting for them to acknowledge
   the issue when I reported it let alone put it right and have now removed the 
   plugin from my site. But thanks to you for sharing the solution.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Weather Atlas Widget] Latest Release (V2.0.1)](https://wordpress.org/support/topic/latest-release-v2-0-1/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/latest-release-v2-0-1/#post-17244215)
 * That’s good news
 * I’m closing this ticket now; if anyone else continues to have any issues, please
   open a fresh ticket.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Weather Atlas Widget] Latest Release (V2.0.1)](https://wordpress.org/support/topic/latest-release-v2-0-1/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/latest-release-v2-0-1/#post-17242111)
 * So, I’ve checked the content of the options field and mine looks like this:-
 * `a:1:{s:12:"_multiwidget";i:1;}`
 * I’m not displaying mine as a widget, I’ve just put the shortcode in the editor
   in WP Admin.
 * It occurred to me that there might be an incomplete div tag somewhere so I had
   a look at your PHP files. One thing struck me: on most of them your HTML is preceded
   by a closing PHP tag and then you PHP echo values within your HTML. For example,
   like this:-
 * `<label for="text_color">**<?php _e( 'Text Color', 'weather-atlas' ); ?>**</label
   >`
 * In the file weather-atlas.php, however, you echo your HTML within your PHP. For
   example, like this:-
 * `
    echo "<div class='weather_demo_wrapper'>"; echo do_shortcode( '[shortcode-
   weather-atlas selected_widget_id=' . $widget_id . ']' ); echo "</div>";
 * Personally, I like a consistent approach but it’s not my plugin and it shouldn’t
   affect the output. What is probably more of a problem though is that the opening
   PHP tag on Line 49 is incomplete; it reads `<?` instead of `<?php`.
 * Might I suggest you scrutinise your code thoroughly in case there are other instances
   of incomplete PHP tags and you might find a “<” or “>” is missing somewhere too.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Weather Atlas Widget] Latest Release (V2.0.1)](https://wordpress.org/support/topic/latest-release-v2-0-1/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/latest-release-v2-0-1/#post-17237471)
 * Thanks for altering the SQL queries. My settings page is still OK now since I
   de-activated and re-activated other plugins & theme. Don’t know why that would
   make a difference. I’ve not had a problem with the shortcode output not showing.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Weather Atlas Widget] Latest Release (V2.0.1)](https://wordpress.org/support/topic/latest-release-v2-0-1/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/latest-release-v2-0-1/#post-17231419)
 * This piece of code which appears in at least 3 of the plugin’s files (eg: line
   52 in weather-atlas/admin/weather-atlas.php) doesn’t use a WP wordpress function:-
   `
   $widget_options = $wpdb->get_results( "SELECT * FROM {$wpdb->options} WHERE option_name
   LIKE 'weather_atlas_widget_%'" );`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Weather Atlas Widget] Latest Release (V2.0.1)](https://wordpress.org/support/topic/latest-release-v2-0-1/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/latest-release-v2-0-1/#post-17230437)
 * So, I took a backup, deactivated all plugins (except yours) & my theme, installed&
   activated default 2023 theme; no change in Settings. When I re-installed my backup,
   however, the Settings page is now fine!
 * What I would like clarification on though please is why you’re not using $wpdb-
   >prepare for the SQL query that fetches the content for the Settings page.
 * Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Easy WP SMTP – WordPress SMTP and Email Logs: Gmail SMTP, Office 365, Outlook, Custom SMTP, and more] Bad update :(](https://wordpress.org/support/topic/bad-update-54/)
 *  [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/bad-update-54/#post-16472202)
 * totally agree – got a few other issues too (see separate ticket)
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Authenticate Filter](https://wordpress.org/support/topic/authenticate-filter-2/)
 *  Thread Starter [farnely](https://wordpress.org/support/users/farnely/)
 * (@farnely)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/authenticate-filter-2/#post-16377842)
 * OK thank you; I’ll reconsider my approach.

Viewing 15 replies - 1 through 15 (of 43 total)

1 [2](https://wordpress.org/support/users/farnely/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/farnely/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/farnely/replies/page/2/?output_format=md)