Changeset 3423987
- Timestamp:
- 12/19/2025 09:43:29 PM (3 months ago)
- Location:
- weather-write/trunk
- Files:
-
- 3 edited
-
includes/class-cronjob.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
weather-write.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
weather-write/trunk/includes/class-cronjob.php
r3393864 r3423987 39 39 $title = sprintf( 'WeatherWrite %s at %02d:%02d', untrailingslashit( $base ), $H, $M ); 40 40 $jobId = isset( $map[$hm] ) ? (int) $map[$hm] : 0; 41 // Pass the time slot in the request body42 $ body = [ 'time' => $hm ];43 $result = self::upsert_job( $token, $url , $tz, $H, $M, $title, $jobId, $body);41 // Pass the time slot in the URL query string (cron-job.org doesn't reliably send POST body) 42 $url_with_time = add_query_arg( 'time', $hm, $url ); 43 $result = self::upsert_job( $token, $url_with_time, $tz, $H, $M, $title, $jobId ); 44 44 if ( is_wp_error( $result ) ) { 45 45 // Best-effort; continue … … 76 76 } 77 77 78 public static function upsert_job( string $token, string $url, string $timezone, int $hour, int $minute, string $title, int $jobId = 0 , array $body = []) {78 public static function upsert_job( string $token, string $url, string $timezone, int $hour, int $minute, string $title, int $jobId = 0 ) { 79 79 $payload = [ 80 80 'job' => [ … … 95 95 ], 96 96 ]; 97 98 // Add request body if provided99 if ( ! empty( $body ) ) {100 $payload['job']['body'] = wp_json_encode( $body );101 }102 97 if ( $jobId > 0 ) { 103 98 // Update existing job (use PATCH per API spec for deltas) -
weather-write/trunk/readme.txt
r3423985 r3423987 4 4 Requires at least: 6.5 5 5 Tested up to: 6.8 6 Stable tag: 1.3.1 16 Stable tag: 1.3.12 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 88 88 == Changelog == 89 89 90 = 1.3.12 = 91 - CRITICAL FIX: Schedule-specific tags now working - time parameter moved to URL query string 92 - Fixed cron-job.org integration to pass time in URL instead of POST body (which wasn't being sent) 93 - Keeps debug logging from 1.3.11 for verification 94 - Tags like "Morning Weather Report" or "Evening Weather Report" will now be applied correctly 95 90 96 = 1.3.11 = 91 97 - DEBUG: Added comprehensive logging to trace time parameter and tag lookup 92 - Helps diagnose why schedule-specific tags may not be applied93 - Temporary debug version - will be removed once issue is resolved98 - Identified that cron-job.org was not sending POST body data 99 - Temporary debug version 94 100 95 101 = 1.3.10 = 96 - CRITICAL FIX: Schedule-specific tags now correctly applied to posts triggered by cron-job.org 97 - Fixed REST API endpoint to properly read time parameter from JSON body 98 - Ensures tags like "Morning Weather Report" or "Evening Weather Report" are always included 102 - Attempted fix for schedule-specific tags (read from JSON body) 103 - Did not resolve issue due to cron-job.org not sending POST body 99 104 100 105 = 1.3.9 = -
weather-write/trunk/weather-write.php
r3423985 r3423987 3 3 * Plugin Name: Weather Write 4 4 * Description: Generate and publish weather-aware posts with summaries, charts, images, alerts, SEO, and more — fully automated or on-demand. 5 * Version: 1.3.1 15 * Version: 1.3.12 6 6 * Author: Mike Freeman - WeatherWrite 7 7 * Plugin URI: https://www.weatherwrite.com/
Note: See TracChangeset
for help on using the changeset viewer.