RSS generation fails
Describe the bug
The application fail to generate a RSS feed on some podcasts, works on other podcasts
Steps to reproduce
- Click on RSS button
Expected behavior
A RSS feed to be generated
Actual behavior
A page printing:
Whoops!
We seem to have hit a snag. Please try again later...
is shown and a CRITICAL error is thrown in logs
Relevant logs and/or screenshots
CRITICAL - 2021-10-24 08:56:07 --> SimpleXMLElement::addAttribute(): Argument #2 ($value) must be of type string, null given
#0 /castopod/app/Helpers/rss_helper.php(262): SimpleXMLElement->addAttribute('type', NULL)
#1 /castopod/app/Controllers/FeedController.php(50): get_rss_feed(Object(App\Entities\Podcast), '')
#2 /castopod/vendor/codeigniter4/codeigniter4/system/CodeIgniter.php(877): App\Controllers\FeedController->index('la_voix_est_lib...')
#3 /castopod/vendor/codeigniter4/codeigniter4/system/CodeIgniter.php(416): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\FeedController))
#4 /castopod/vendor/codeigniter4/codeigniter4/system/CodeIgniter.php(324): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
#5 /castopod/public/index.php(41): CodeIgniter\CodeIgniter->run()
#6 {main}
Context
- Castopod: 1.0.0-alpha.75
- OS: php8-alpine docker container (server), Manjaro (client)
- Browser: Firefox
- Web server: Nginx and PHP-FPM
Possible fixes
No idea but I can help you to investigate on this issue
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Author Developer
I just found the origin of the crash. It happens when there is a URL to a transcript
/castopod/app/Helpers/rss_helper.php(262)
.In our database there is :
MariaDB [castopod]> SELECT podcast_id, id, transcript_file_path, transcript_file_remote_url FROM cp_episodes WHERE podcast_id = 1; +------------+----+----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------+ | podcast_id | id | transcript_file_path | transcript_file_remote_url | +------------+----+----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------+ | 1 | 43 | NULL | NULL | | 1 | 44 | NULL | NULL | | 1 | 16 | NULL | NULL | | 1 | 34 | NULL | NULL | | 1 | 1 | NULL | https://www.april.org/emission-la-voix-est-libre-picasoft-du-17-mai-2019-sur-graf-hit | | 1 | 38 | NULL | NULL | | 1 | 2 | la_voix_est_libre/firefox-un-navigateur-web-libre-transcript.srt | NULL | | 1 | 5 | la_voix_est_libre/funkwhale-comment-la-decentralisation-et-la-federation-permettent-la-creation-transcript.srt | NULL | | 1 | 26 | NULL | NULL | | 1 | 33 | NULL | NULL | | 1 | 17 | NULL | NULL | | 1 | 29 | NULL | NULL | | 1 | 19 | NULL | NULL | | 1 | 18 | NULL | NULL | | 1 | 23 | NULL | NULL | | 1 | 4 | la_voix_est_libre/la-redecentralisation-du-web-transcript.srt | NULL | | 1 | 32 | NULL | NULL | | 1 | 20 | NULL | NULL | | 1 | 49 | NULL | NULL | | 1 | 39 | NULL | NULL | | 1 | 31 | NULL | NULL | | 1 | 46 | NULL | NULL | | 1 | 47 | NULL | NULL | | 1 | 45 | NULL | NULL | | 1 | 35 | NULL | NULL | | 1 | 27 | NULL | NULL | | 1 | 15 | NULL | NULL | | 1 | 42 | NULL | NULL | | 1 | 52 | NULL | NULL | | 1 | 54 | NULL | NULL | | 1 | 53 | NULL | NULL | | 1 | 55 | NULL | NULL | | 1 | 40 | NULL | NULL | | 1 | 30 | NULL | NULL | | 1 | 50 | NULL | NULL | | 1 | 56 | NULL | NULL | | 1 | 22 | NULL | NULL | | 1 | 37 | NULL | NULL | | 1 | 28 | NULL | https://www.april.org/open-science-la-libre-circulation-des-connaissances-la-voix-est-libre-graf-hit | | 1 | 3 | NULL | https://www.april.org/openstreetmap-s-approprier-son-territoire-emission-la-voix-est-libre-picasoft | | 1 | 48 | NULL | NULL | | 1 | 21 | NULL | NULL | | 1 | 36 | NULL | NULL | | 1 | 41 | NULL | NULL | | 1 | 51 | NULL | https://www.april.org/sobriete-numerique-pour-eviter-la-gueule-de-bois-la-voix-est-libre | | 1 | 24 | NULL | NULL | | 1 | 25 | NULL | NULL | +------------+----+----------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------+
It seems that
Mimes::guessTypeFromExtension(pathinfo($episode->transcript_file_url, PATHINFO_EXTENSION))
fails with our remote URL to a transcript is not null. Is there a mandatory format for these transcripts ? - Yassine Doghri closed with commit 3f2e0560
closed with commit 3f2e0560
- Yassine Doghri mentioned in issue #149 (closed)
mentioned in issue #149 (closed)
- Yassine Doghri mentioned in commit a09853ef
mentioned in commit a09853ef
- Yassine Doghri mentioned in commit 3f2e0560
mentioned in commit 3f2e0560
- Yassine Doghri assigned to @yassine
assigned to @yassine
- Yassine Doghri mentioned in commit d807ab97
mentioned in commit d807ab97
- Yassine Doghri mentioned in commit f9572e41
mentioned in commit f9572e41