Media validation doesn't work upon new episode (and storing data in draft in general)

Hi,

thank you very much for the hard work on the awesome plugin!

I have the same two problems in two Podlove Publisher instances, plus an additional one in only one of the instances. They are there since a while, I had hoped it would fix itself with a new version, but the recent releases to v3.8.12 didn’t change anything so I’m now turning here for help. I was on the brink of opening a bug in GitHub, but then it seems like such a basic problem that probably most other users would also have it, so I think I’m somehow holding it wrong…:

Original Problem: When creating a new Episode at /wp-admin/post-new.php?post_type=podcast, I type in the slug of the media file that I already put in the correct location (in this case “ab014” for the file at https://annebu.de/wp-content/podcast/ab014.mp3). Before, it always just turned up in the “Mediendateien” section, I could create “verify all” and “detect duration” and all is good. But currently, it doesn’t turn up there. I checked in the developer console and saw, /wp-admin/admin-ajax.php?action=podlove-file-create&episode_id=&episode_asset_id=1&slug=ab014 returning a 200 but with an empty body. When I “edit and re-send” the request in the console and add an episode_id like /wp-admin/admin-ajax.php?action=podlove-file-create&episode_id=662&episode_asset_id=1&slug=ab014, iI get a response {"file_id":97,"file_size":null,"file_url":""}, if I try it in an already released episode it looks like {"file_url":"https:\/\/annebu.de\/wp-content\/podcast\/ab014.mp3","file_id":77,"reachable":true,"file_size":71330045,"file_size_human":"71.330.045"}.

The follow-up issue is, that if I fill out fields in the new episode creation page and save as draft, leave the page and return, almost all fields are empty, except for the episode number, the post title and text and including even the contributors section, that was before filled by the defaults.

Then, the third issue, that I have only in one of my two Podlove Publisher instances is, that if I navigate to /wp-admin/admin.php?page=podlove_Support_settings_handle, I only get " Error thrown - Class “Spyc” not found" on an otherwise empty page. In the other instance, I get

Website                    https://wahlocast.de
PHP Version                8.0.30
WordPress Version          6.3.2
WordPress Theme            Twenty Thirteen v3.9
Active Plugins             
           - All in one Favicon v4.8
           - Antispam Bee v2.11.5
           - Impressum v2.0.3
           - Podlove Podcast Publisher v3.8.12
           - Podlove Web Player v5.7.1
           - Simple Statistics for Feeds v20230714
           - WebAuthn Provider for Two Factor v2.1.0
           - Two-Factor v0.8.2
           - Math Captcha v1.2.10
           - Connect Matomo v1.0.30
WordPress Database Charset utf8mb4
WordPress Database Collate 
Publisher Version          3.8.12
Publisher Database Version 153
Web Player Version         player_v5
Monolog Version            1
open_basedir               ok
curl Version               8.4.0
iconv                      available
simplexml                  ok
max_execution_time         90
upload_max_filesize        2048M
memory_limit               256M
disable_classes            
disable_functions          
permalinks                 ok (/%postname%/)
podlove_permalinks         ok
podcast_settings           ok
web_player                 ok
podlove_cache              on
assets                     
  - mp3    audio/mpeg       https://wahlocast.de/feed/mp3/
cron                       ok
duplicate_guids            ok

0 errors
0 notices
Nice, Everything looks fine!

What am I doing wrong? Can you help me somehow? Can I provide some more information for diagnosis?

This problem keeps me from releasing new episodes :frowning:

Thanks a lot in advance!
Cheers,
Hanno

Hi, can you check if this issue is resolved with the latest 4.0 release? I’m not sure what went wrong here but a lot of the code related to your issues changes with this release, so it might accidentally be fixed :slight_smile:

Hi. Thanks for the response! :slight_smile:

I just checked on both instances and unfortunately both are still not working, the symptoms change a bit:

  • Upon entering the “New Episode” page, there are three black popups in the lower left corner, all three containing just the text “[object Object]”
  • The browser console (Firefox) contains 7 errors:
    • podloveInitShowWidgetNumberingHook https://annebu.de/wp-admin/post-new.php?post_type=podcast:557
      EventListener.handleEvent* https://annebu.de/wp-admin/post-new.php?post_type=podcast:571
      [post-new.php:557:25](https://annebu.de/wp-admin/post-new.php?post_type=podcast)
      podloveInitShowWidgetNumberingHook https://annebu.de/wp-admin/post-new.php?post_type=podcast:557
      (Async: EventListener.handleEvent)
      <anonym> https://annebu.de/wp-admin/post-new.php?post_type=podcast:571
      
    • XHR GET https://annebu.de/wp-json/podlove/v2/episodes/null? [HTTP/2 404 141ms]
    • XHR GET https://annebu.de/wp-json/podlove/v2/episodes/null? [HTTP/2 404 141ms]
    • XHR GET https://annebu.de/wp-json/podlove/v2/episodes/null/media? [HTTP/2 404 118ms]
    • GET https://annebu.de/wp-admin/null [HTTP/2 404 82ms]
    •  TypeError: (intermediate value).result is undefined
       E8 https://annebu.de/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/client/dist/client.js?ver=4.0.1:53
       g https://annebu.de/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/client/dist/client.js?ver=4.0.1:22
       R https://annebu.de/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/client/dist/client.js?ver=4.0.1:22
       promise callback*Zh https://annebu.de/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/client/dist/client.js?ver=4.0.1:19
       b https://annebu.de/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/client/dist/client.js?ver=4.0.1:22
       $ https://annebu.de/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/client/dist/client.js?ver=4.0.1:22
       g https://annebu.de/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/client/dist/client.js?ver=4.0.1:22
       R https://annebu.de/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/client/dist/client.js?ver=4.0.1:22
       [client.js:19:3597](https://annebu.de/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/client/dist/client.js?ver=4.0.1)
      
    • The above error occurred in task E8 created by S8 created by anonymous created by anonymous created by anonymous client.js:19:3614
  • The section “Media Files” only shows and endlessly turning " Loading…" animation
  • Typing “014” into the “Number” field yields another “[object Object]” notifcation popup and XHR GET https://annebu.de/wp-json/podlove/v2/episodes/null? [HTTP/2 404 console error together with three log messages " todo number 0", " todo number 01", " todo number 014"
  • Selecting Type=full yields another error + todo
  • Entering content into Title => another 404 to the same “null” URL
  • Storing the episode as a draft actually only saves the regular wordpress post fields title and blocks

Just to be sure, I created a regular blog post without issues.

I also tried to deactivate all plugins except podlove: Same behaviour.

Ah, and at least podlove_Support_settings_handle now works on both instances:

Website                    https://annebu.de
PHP Version                8.0.30
WordPress Version          6.3.2
WordPress Theme            Twenty Seventeen v3.3
Active Plugins             
           - All in one Favicon v4.8
           - Link Icons v0.4
           - Podlove Beta Tester v2.0.3
           - Podlove Podcast Publisher v4.0.1
           - Simple Statistics for Feeds v20231026
           - WebAuthn Provider for Two Factor v2.1.0
           - Two-Factor v0.8.2
           - Math Captcha v1.2.10
           - NextGEN Gallery v3.41
WordPress Database Charset utf8mb4
WordPress Database Collate 
Publisher Version          4.0.1
Publisher Database Version 153
Web Player Version         player_v4
open_basedir               ok
curl Version               8.4.0
iconv                      available
simplexml                  ok
max_execution_time         90
upload_max_filesize        2048M
memory_limit               256M
disable_classes            
disable_functions          
permalinks                 ok (/%postname%/)
podlove_permalinks         ok
podcast_settings           ok
web_player                 ok
podlove_cache              on
assets                     
  - mp3    audio/mpeg       https://annebu.de/feed/mp3/
cron                       ok
duplicate_guids            ok

0 errors
0 notices
Nice, Everything looks fine!
Website                    https://wahlocast.de
PHP Version                8.0.30
WordPress Version          6.3.2
WordPress Theme            Twenty Thirteen v3.9
Active Plugins             
           - All in one Favicon v4.8
           - Antispam Bee v2.11.5
           - Impressum v2.0.3
           - Podlove Podcast Publisher v4.0.1
           - Podlove Web Player v5.7.1
           - Simple Statistics for Feeds v20231026
           - WebAuthn Provider for Two Factor v2.1.0
           - Two-Factor v0.8.2
           - Math Captcha v1.2.10
           - Connect Matomo v1.0.30
WordPress Database Charset utf8mb4
WordPress Database Collate 
Publisher Version          4.0.1
Publisher Database Version 153
Web Player Version         player_v5
open_basedir               ok
curl Version               8.4.0
iconv                      available
simplexml                  ok
max_execution_time         90
upload_max_filesize        2048M
memory_limit               256M
disable_classes            
disable_functions          
permalinks                 ok (/%postname%/)
podlove_permalinks         ok
podcast_settings           ok
web_player                 ok
podlove_cache              on
assets                     
  - mp3    audio/mpeg       https://wahlocast.de/feed/mp3/
cron                       ok
duplicate_guids            ok

0 errors
0 notices
Nice, Everything looks fine!

Strange, strange.

4.0.2 fixes an issue with this one:

You might also try to disable the “Automatic Numbering” module (which uses this hook).

But in general it looks like the episode is not created when it should be (which results in the episodes/null calls). I’m currently out of ideas why that might be.

I updated to 4.0.2 and deactivated the Automatic Numbering module. No change in behaviour though :frowning:

How can I provide more information or diagnose better?

When creating a new episode, is the Type automatically set to “full” or is that field empty?

Screenhot Firefox Developer Edition 2023-11-07 17.18.02@2x

It’s empty:
Screenshot 2023-11-07 at 17-47-18 Neue Episode anlegen ‹ Anne Bude — WordPress

Thank you, that confirms my suspicion that the episode is not actually created, only the WordPress post object – because the episode type is set to “full” immediately on creation. Still no idea why that happens or how to reproduce it, but I had a hunch on how to fix it.

See if 4.0.3 fixes is for you :crossed_fingers:

Thanks for the big effort! :heart:

I updated to 4.0.3 on both instances. Unfortunately still unchanged behaviour :frowning:

I noticed “annebu.de/automatisch-gespeicherter-entwurf/” (see screenshot on the right), might that be a lead?

I could provide you with SSH oder wordpress admin user access, if that helps?

If you could send me admin access and SSH/sFTP that would be fantastic :slight_smile: Maybe via eric@podlove.org (and feel free to switch to German :wink: )

1 Like

Thank you! Done

Same here! I think the error is, that podlove sets the URL wrong. Instead of using the folder set in the configuration, the player asks for https://MYDOMAIN.COM/podlove/file/95/s/opengraph/c/episode/episode41.mp3. I created that folder, uploaded it there and it works. But this is not the folder I set in the configuration.

That URL does not correlate to an actual directory on your server. It is just used for tracking purposes, and then redirects to the actual URL where the file exists.

Yeah I was wrong, that also does not work. What works is choosing a file out of the media asset directory and then setting a different value in thephpMyAdmin. If I enter the same value in the slug field in the episode edit view, it does not work.

Thanks to @ericteubert :heart:, it is now fixed for my original case!

1 Like

For the record:

With PHP error logging turned on, the following error appeared when creating an episode:

WordPress database error Unknown column ‘soundbite_title’ in ‘field list’

This is the result of the last database migration failing. Running the migration again manually resulted in another error:

Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

There are multiple fixes for this. One would be to increase the row size in the db config. But in this case the fix was simpler: running OPTIMIZE TABLE wp_podlove_episode once and then the latest migration again (which is ALTER TABLE wp_podlove_episodeADD COLUMNsoundbite_title VARCHAR(255)).

I will add the OPTIMIZE TABLE to the migration in the next patch because I remember seeing similar issues occasionally and it might help others.

Thanks @friesenkiwi for letting me debug in the live system :pray:

/edit: related issue where someone explained the root cause Episode data not stored and no audio files listed · Issue #1273 · podlove/podlove-publisher · GitHub