Commit 6f34f25
committed
fix(bulk): fix indefinite spinner and stuck counter in Generate Missing Next-Gen
Seven bugs caused the bulk next-gen generation flow to spin indefinitely:
Bug 1 (CustomFolders): SQL JOIN did not filter on fo.active = 1, so files
from inactive folders inflated the count with entries never processed.
Bug 2 (CustomFolders): WHERE clause included OR fi.data IS NULL, admitting
files with no optimization data that always fail generate_nextgen_versions().
Bug 3 (Bulk): no-backup error on the first context aborted the entire loop,
silently skipping valid media library images.
Bug 4 (WP): status condition included mt1.meta_key IS NULL, queuing images
with _imagify_data but no _imagify_status row, which always fail with
not_optimized.
Bug 5 (AbstractProcess): when the API reported WebP larger than original,
str_replace corrupted the storage key (full@imagify-webp -> full), so the
@imagify-webp entry was never written and the image matched every subsequent
NOT LIKE poll indefinitely.
Bug 6 (WP, CustomFolders): mime-type exclusion silently failed because
explode/str_replace left a leading space on the mime string; webp source
files were included in the queue.
Bug 7 (WP, CustomFolders): .webp files stored with wrong post_mime_type
(e.g. image/jpeg) slipped past the SQL exclusion and were permanently stuck
as remaining = 1.
Closes #10411 parent dc72df5 commit 6f34f25
4 files changed
Lines changed: 23 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 245 | + | |
252 | 246 | | |
253 | 247 | | |
254 | 248 | | |
255 | 249 | | |
256 | 250 | | |
257 | 251 | | |
258 | 252 | | |
259 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
260 | 256 | | |
261 | 257 | | |
262 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | | - | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
129 | | - | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
162 | 169 | | |
163 | 170 | | |
164 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
236 | | - | |
| 237 | + | |
237 | 238 | | |
238 | 239 | | |
239 | 240 | | |
| |||
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
299 | 306 | | |
300 | 307 | | |
301 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1970 | 1970 | | |
1971 | 1971 | | |
1972 | 1972 | | |
1973 | | - | |
1974 | | - | |
1975 | | - | |
1976 | 1973 | | |
1977 | 1974 | | |
1978 | 1975 | | |
| |||
0 commit comments