Forum Replies Created

Viewing 15 replies - 1 through 15 (of 43 total)
  • Thread Starter farnely

    (@farnely)

    @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!

    Thread Starter farnely

    (@farnely)

    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 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”.

    Thread Starter farnely

    (@farnely)

    Any chance of an update please?

    Thread Starter farnely

    (@farnely)

    Yes it’s 157.15.90.216. According to https://www.iplocation.net/ip-lookup, it’s in India.

    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

    Thread Starter farnely

    (@farnely)

    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!

    Thread Starter farnely

    (@farnely)

    @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.

    Thread Starter farnely

    (@farnely)

    @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.

    Thread Starter farnely

    (@farnely)

    That’s good news

    I’m closing this ticket now; if anyone else continues to have any issues, please open a fresh ticket.

    Thread Starter farnely

    (@farnely)

    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.

    Thread Starter farnely

    (@farnely)

    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.

    Thread Starter farnely

    (@farnely)

    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_%'" );

    Thread Starter farnely

    (@farnely)

    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.

    totally agree – got a few other issues too (see separate ticket)

    Thread Starter farnely

    (@farnely)

    OK thank you; I’ll reconsider my approach.

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