From 8c64f25a0e72fec03d25544797d32623b2276fce Mon Sep 17 00:00:00 2001
From: Yassine Doghri <yassine@doghri.fr>
Date: Tue, 25 May 2021 14:05:12 +0000
Subject: [PATCH] fix(category): remove uncategorized option to enforce users
 in choosing a category

Apple podcasts requires a category to submit a valid podcast RSS feed. The "uncategorized" category
is not a valid category.
---
 .../2020-05-29-152000_add_categories.php      |   1 +
 app/Database/Seeds/CategorySeeder.php         | 227 +++++++++---------
 app/Helpers/form_helper.php                   |  84 +++++++
 app/Language/en/Podcast.php                   |   1 +
 app/Language/fr/Podcast.php                   |   1 +
 app/Views/admin/podcast/create.php            |   3 +-
 app/Views/admin/podcast/import.php            |   3 +-
 7 files changed, 201 insertions(+), 119 deletions(-)

diff --git a/app/Database/Migrations/2020-05-29-152000_add_categories.php b/app/Database/Migrations/2020-05-29-152000_add_categories.php
index 72ebc6e419..d9ea0b6410 100644
--- a/app/Database/Migrations/2020-05-29-152000_add_categories.php
+++ b/app/Database/Migrations/2020-05-29-152000_add_categories.php
@@ -24,6 +24,7 @@ class AddCategories extends Migration
             'parent_id' => [
                 'type' => 'INT',
                 'unsigned' => true,
+                'null' => true,
             ],
             'code' => [
                 'type' => 'VARCHAR',
diff --git a/app/Database/Seeds/CategorySeeder.php b/app/Database/Seeds/CategorySeeder.php
index 51bfbd9fe7..ba0699c804 100644
--- a/app/Database/Seeds/CategorySeeder.php
+++ b/app/Database/Seeds/CategorySeeder.php
@@ -18,778 +18,771 @@ class CategorySeeder extends Seeder
     {
         $data = [
             [
-                'parent_id' => 0,
-                'id' => 0,
-                'code' => 'uncategorized',
-                'apple_category' => 'uncategorized',
-                'google_category' => 'uncategorized',
-            ],
-            [
-                'parent_id' => 0,
                 'id' => 1,
+                'parent_id' => null,
                 'code' => 'arts',
                 'apple_category' => 'Arts',
                 'google_category' => 'Arts',
             ],
             [
-                'parent_id' => 0,
                 'id' => 2,
+                'parent_id' => null,
                 'code' => 'business',
                 'apple_category' => 'Business',
                 'google_category' => 'Business',
             ],
             [
-                'parent_id' => 0,
                 'id' => 3,
+                'parent_id' => null,
                 'code' => 'comedy',
                 'apple_category' => 'Comedy',
                 'google_category' => 'Comedy',
             ],
             [
-                'parent_id' => 0,
                 'id' => 4,
+                'parent_id' => null,
                 'code' => 'education',
                 'apple_category' => 'Education',
                 'google_category' => 'Education',
             ],
             [
-                'parent_id' => 0,
                 'id' => 5,
+                'parent_id' => null,
                 'code' => 'fiction',
                 'apple_category' => 'Fiction',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 0,
                 'id' => 6,
+                'parent_id' => null,
                 'code' => 'government',
                 'apple_category' => 'Government',
                 'google_category' => 'Government & Organizations',
             ],
             [
-                'parent_id' => 0,
                 'id' => 7,
+                'parent_id' => null,
                 'code' => 'health_and_fitness',
                 'apple_category' => 'Health & Fitness',
                 'google_category' => 'Health',
             ],
             [
-                'parent_id' => 0,
                 'id' => 8,
+                'parent_id' => null,
                 'code' => 'history',
                 'apple_category' => 'History',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 0,
                 'id' => 9,
+                'parent_id' => null,
                 'code' => 'kids_and_family',
                 'apple_category' => 'Kids & Family',
                 'google_category' => 'Kids & Family',
             ],
             [
-                'parent_id' => 0,
                 'id' => 10,
+                'parent_id' => null,
                 'code' => 'leisure',
                 'apple_category' => 'Leisure',
                 'google_category' => 'Games & Hobbies',
             ],
             [
-                'parent_id' => 0,
                 'id' => 11,
+                'parent_id' => null,
                 'code' => 'music',
                 'apple_category' => 'Music',
                 'google_category' => 'Music',
             ],
             [
-                'parent_id' => 0,
                 'id' => 12,
+                'parent_id' => null,
                 'code' => 'news',
                 'apple_category' => 'News',
                 'google_category' => 'News & Politics',
             ],
             [
-                'parent_id' => 0,
                 'id' => 13,
+                'parent_id' => null,
                 'code' => 'religion_and_spirituality',
                 'apple_category' => 'Religion & Spirituality',
                 'google_category' => 'Religion & Spirituality',
             ],
             [
-                'parent_id' => 0,
                 'id' => 14,
+                'parent_id' => null,
                 'code' => 'science',
                 'apple_category' => 'Science',
                 'google_category' => 'Science & Medicine',
             ],
             [
-                'parent_id' => 0,
                 'id' => 15,
+                'parent_id' => null,
                 'code' => 'society_and_culture',
                 'apple_category' => 'Society & Culture',
                 'google_category' => 'Society & Culture',
             ],
             [
-                'parent_id' => 0,
                 'id' => 16,
+                'parent_id' => null,
                 'code' => 'sports',
                 'apple_category' => 'Sports',
                 'google_category' => 'Sports & Recreation',
             ],
             [
-                'parent_id' => 0,
                 'id' => 17,
+                'parent_id' => null,
                 'code' => 'technology',
                 'apple_category' => 'Technology',
                 'google_category' => 'Technology',
             ],
             [
-                'parent_id' => 0,
                 'id' => 18,
+                'parent_id' => null,
                 'code' => 'true_crime',
                 'apple_category' => 'True Crime',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 0,
                 'id' => 19,
+                'parent_id' => null,
                 'code' => 'tv_and_film',
                 'apple_category' => 'TV & Film',
                 'google_category' => 'TV & Film',
             ],
             [
-                'parent_id' => 1,
                 'id' => 20,
+                'parent_id' => 1,
                 'code' => 'books',
                 'apple_category' => 'Books',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 1,
                 'id' => 21,
+                'parent_id' => 1,
                 'code' => 'design',
                 'apple_category' => 'Design',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 1,
                 'id' => 22,
+                'parent_id' => 1,
                 'code' => 'fashion_and_beauty',
                 'apple_category' => 'Fashion & Beauty',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 1,
                 'id' => 23,
+                'parent_id' => 1,
                 'code' => 'food',
                 'apple_category' => 'Food',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 1,
                 'id' => 24,
+                'parent_id' => 1,
                 'code' => 'performing_arts',
                 'apple_category' => 'Performing Arts',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 1,
                 'id' => 25,
+                'parent_id' => 1,
                 'code' => 'visual_arts',
                 'apple_category' => 'Visual Arts',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 2,
                 'id' => 26,
+                'parent_id' => 2,
                 'code' => 'careers',
                 'apple_category' => 'Careers',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 2,
                 'id' => 27,
+                'parent_id' => 2,
                 'code' => 'entrepreneurship',
                 'apple_category' => 'Entrepreneurship',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 2,
                 'id' => 28,
+                'parent_id' => 2,
                 'code' => 'investing',
                 'apple_category' => 'Investing',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 2,
                 'id' => 29,
+                'parent_id' => 2,
                 'code' => 'management',
                 'apple_category' => 'Management',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 2,
                 'id' => 30,
+                'parent_id' => 2,
                 'code' => 'marketing',
                 'apple_category' => 'Marketing',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 2,
                 'id' => 31,
+                'parent_id' => 2,
                 'code' => 'non_profit',
                 'apple_category' => 'Non-Profit',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 3,
                 'id' => 32,
+                'parent_id' => 3,
                 'code' => 'comedy_interviews',
                 'apple_category' => 'Comedy Interviews',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 3,
                 'id' => 33,
+                'parent_id' => 3,
                 'code' => 'improv',
                 'apple_category' => 'Improv',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 3,
                 'id' => 34,
+                'parent_id' => 3,
                 'code' => 'stand_up',
                 'apple_category' => 'Stand-Up',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 4,
                 'id' => 35,
+                'parent_id' => 4,
                 'code' => 'courses',
                 'apple_category' => 'Courses',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 4,
                 'id' => 36,
+                'parent_id' => 4,
                 'code' => 'how_to',
                 'apple_category' => 'How To',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 4,
                 'id' => 37,
+                'parent_id' => 4,
                 'code' => 'language_learning',
                 'apple_category' => 'Language Learning',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 4,
                 'id' => 38,
+                'parent_id' => 4,
                 'code' => 'self_improvement',
                 'apple_category' => 'Self-Improvement',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 5,
                 'id' => 39,
+                'parent_id' => 5,
                 'code' => 'comedy_fiction',
                 'apple_category' => 'Comedy Fiction',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 5,
                 'id' => 40,
+                'parent_id' => 5,
                 'code' => 'drama',
                 'apple_category' => 'Drama',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 5,
                 'id' => 41,
+                'parent_id' => 5,
                 'code' => 'science_fiction',
                 'apple_category' => 'Science Fiction',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 7,
                 'id' => 42,
+                'parent_id' => 7,
                 'code' => 'alternative_health',
                 'apple_category' => 'Alternative Health',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 7,
                 'id' => 43,
+                'parent_id' => 7,
                 'code' => 'fitness',
                 'apple_category' => 'Fitness',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 7,
                 'id' => 44,
+                'parent_id' => 7,
                 'code' => 'medicine',
                 'apple_category' => 'Medicine',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 7,
                 'id' => 45,
+                'parent_id' => 7,
                 'code' => 'mental_health',
                 'apple_category' => 'Mental Health',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 7,
                 'id' => 46,
+                'parent_id' => 7,
                 'code' => 'nutrition',
                 'apple_category' => 'Nutrition',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 7,
                 'id' => 47,
+                'parent_id' => 7,
                 'code' => 'sexuality',
                 'apple_category' => 'Sexuality',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 9,
                 'id' => 48,
+                'parent_id' => 9,
                 'code' => 'education_for_kids',
                 'apple_category' => 'Education for Kids',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 9,
                 'id' => 49,
+                'parent_id' => 9,
                 'code' => 'parenting',
                 'apple_category' => 'Parenting',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 9,
                 'id' => 50,
+                'parent_id' => 9,
                 'code' => 'pets_and_animals',
                 'apple_category' => 'Pets & Animals',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 9,
                 'id' => 51,
+                'parent_id' => 9,
                 'code' => 'stories_for_kids',
                 'apple_category' => 'Stories for Kids',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 10,
                 'id' => 52,
+                'parent_id' => 10,
                 'code' => 'animation_and_manga',
                 'apple_category' => 'Animation & Manga',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 10,
                 'id' => 53,
+                'parent_id' => 10,
                 'code' => 'automotive',
                 'apple_category' => 'Automotive',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 10,
                 'id' => 54,
+                'parent_id' => 10,
                 'code' => 'aviation',
                 'apple_category' => 'Aviation',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 10,
                 'id' => 55,
+                'parent_id' => 10,
                 'code' => 'crafts',
                 'apple_category' => 'Crafts',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 10,
                 'id' => 56,
+                'parent_id' => 10,
                 'code' => 'games',
                 'apple_category' => 'Games',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 10,
                 'id' => 57,
+                'parent_id' => 10,
                 'code' => 'hobbies',
                 'apple_category' => 'Hobbies',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 10,
                 'id' => 58,
+                'parent_id' => 10,
                 'code' => 'home_and_garden',
                 'apple_category' => 'Home & Garden',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 10,
                 'id' => 59,
+                'parent_id' => 10,
                 'code' => 'video_games',
                 'apple_category' => 'Video Games',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 11,
                 'id' => 60,
+                'parent_id' => 11,
                 'code' => 'music_commentary',
                 'apple_category' => 'Music Commentary',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 11,
                 'id' => 61,
+                'parent_id' => 11,
                 'code' => 'music_history',
                 'apple_category' => 'Music History',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 11,
                 'id' => 62,
+                'parent_id' => 11,
                 'code' => 'music_interviews',
                 'apple_category' => 'Music Interviews',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 12,
                 'id' => 63,
+                'parent_id' => 12,
                 'code' => 'business_news',
                 'apple_category' => 'Business News',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 12,
                 'id' => 64,
+                'parent_id' => 12,
                 'code' => 'daily_news',
                 'apple_category' => 'Daily News',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 12,
                 'id' => 65,
+                'parent_id' => 12,
                 'code' => 'entertainment_news',
                 'apple_category' => 'Entertainment News',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 12,
                 'id' => 66,
+                'parent_id' => 12,
                 'code' => 'news_commentary',
                 'apple_category' => 'News Commentary',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 12,
                 'id' => 67,
+                'parent_id' => 12,
                 'code' => 'politics',
                 'apple_category' => 'Politics',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 12,
                 'id' => 68,
+                'parent_id' => 12,
                 'code' => 'sports_news',
                 'apple_category' => 'Sports News',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 12,
                 'id' => 69,
+                'parent_id' => 12,
                 'code' => 'tech_news',
                 'apple_category' => 'Tech News',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 13,
                 'id' => 70,
+                'parent_id' => 13,
                 'code' => 'buddhism',
                 'apple_category' => 'Buddhism',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 13,
                 'id' => 71,
+                'parent_id' => 13,
                 'code' => 'christianity',
                 'apple_category' => 'Christianity',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 13,
                 'id' => 72,
+                'parent_id' => 13,
                 'code' => 'hinduism',
                 'apple_category' => 'Hinduism',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 13,
                 'id' => 73,
+                'parent_id' => 13,
                 'code' => 'islam',
                 'apple_category' => 'Islam',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 13,
                 'id' => 74,
+                'parent_id' => 13,
                 'code' => 'judaism',
                 'apple_category' => 'Judaism',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 13,
                 'id' => 75,
+                'parent_id' => 13,
                 'code' => 'religion',
                 'apple_category' => 'Religion',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 13,
                 'id' => 76,
+                'parent_id' => 13,
                 'code' => 'spirituality',
                 'apple_category' => 'Spirituality',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 14,
                 'id' => 77,
+                'parent_id' => 14,
                 'code' => 'astronomy',
                 'apple_category' => 'Astronomy',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 14,
                 'id' => 78,
+                'parent_id' => 14,
                 'code' => 'chemistry',
                 'apple_category' => 'Chemistry',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 14,
                 'id' => 79,
+                'parent_id' => 14,
                 'code' => 'earth_sciences',
                 'apple_category' => 'Earth Sciences',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 14,
                 'id' => 80,
+                'parent_id' => 14,
                 'code' => 'life_sciences',
                 'apple_category' => 'Life Sciences',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 14,
                 'id' => 81,
+                'parent_id' => 14,
                 'code' => 'mathematics',
                 'apple_category' => 'Mathematics',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 14,
                 'id' => 82,
+                'parent_id' => 14,
                 'code' => 'natural_sciences',
                 'apple_category' => 'Natural Sciences',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 14,
                 'id' => 83,
+                'parent_id' => 14,
                 'code' => 'nature',
                 'apple_category' => 'Nature',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 14,
                 'id' => 84,
+                'parent_id' => 14,
                 'code' => 'physics',
                 'apple_category' => 'Physics',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 14,
                 'id' => 85,
+                'parent_id' => 14,
                 'code' => 'social_sciences',
                 'apple_category' => 'Social Sciences',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 15,
                 'id' => 86,
+                'parent_id' => 15,
                 'code' => 'documentary',
                 'apple_category' => 'Documentary',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 15,
                 'id' => 87,
+                'parent_id' => 15,
                 'code' => 'personal_journals',
                 'apple_category' => 'Personal Journals',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 15,
                 'id' => 88,
+                'parent_id' => 15,
                 'code' => 'philosophy',
                 'apple_category' => 'Philosophy',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 15,
                 'id' => 89,
+                'parent_id' => 15,
                 'code' => 'places_and_travel',
                 'apple_category' => 'Places & Travel',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 15,
                 'id' => 90,
+                'parent_id' => 15,
                 'code' => 'relationships',
                 'apple_category' => 'Relationships',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 91,
+                'parent_id' => 16,
                 'code' => 'baseball',
                 'apple_category' => 'Baseball',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 92,
+                'parent_id' => 16,
                 'code' => 'basketball',
                 'apple_category' => 'Basketball',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 93,
+                'parent_id' => 16,
                 'code' => 'cricket',
                 'apple_category' => 'Cricket',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 94,
+                'parent_id' => 16,
                 'code' => 'fantasy_sports',
                 'apple_category' => 'Fantasy Sports',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 95,
+                'parent_id' => 16,
                 'code' => 'football',
                 'apple_category' => 'Football',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 96,
+                'parent_id' => 16,
                 'code' => 'golf',
                 'apple_category' => 'Golf',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 97,
+                'parent_id' => 16,
                 'code' => 'hockey',
                 'apple_category' => 'Hockey',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 98,
+                'parent_id' => 16,
                 'code' => 'rugby',
                 'apple_category' => 'Rugby',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 99,
+                'parent_id' => 16,
                 'code' => 'running',
                 'apple_category' => 'Running',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 100,
+                'parent_id' => 16,
                 'code' => 'soccer',
                 'apple_category' => 'Soccer',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 101,
+                'parent_id' => 16,
                 'code' => 'swimming',
                 'apple_category' => 'Swimming',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 102,
+                'parent_id' => 16,
                 'code' => 'tennis',
                 'apple_category' => 'Tennis',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 103,
+                'parent_id' => 16,
                 'code' => 'volleyball',
                 'apple_category' => 'Volleyball',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 104,
+                'parent_id' => 16,
                 'code' => 'wilderness',
                 'apple_category' => 'Wilderness',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 16,
                 'id' => 105,
+                'parent_id' => 16,
                 'code' => 'wrestling',
                 'apple_category' => 'Wrestling',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 19,
                 'id' => 106,
+                'parent_id' => 19,
                 'code' => 'after_shows',
                 'apple_category' => 'After Shows',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 19,
                 'id' => 107,
+                'parent_id' => 19,
                 'code' => 'film_history',
                 'apple_category' => 'Film History',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 19,
                 'id' => 108,
+                'parent_id' => 19,
                 'code' => 'film_interviews',
                 'apple_category' => 'Film Interviews',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 19,
                 'id' => 109,
+                'parent_id' => 19,
                 'code' => 'film_reviews',
                 'apple_category' => 'Film Reviews',
                 'google_category' => '',
             ],
             [
-                'parent_id' => 19,
                 'id' => 110,
+                'parent_id' => 19,
                 'code' => 'tv_reviews',
                 'apple_category' => 'TV Reviews',
                 'google_category' => '',
diff --git a/app/Helpers/form_helper.php b/app/Helpers/form_helper.php
index a4bc8649f5..85e59e8055 100644
--- a/app/Helpers/form_helper.php
+++ b/app/Helpers/form_helper.php
@@ -172,3 +172,87 @@ if (! function_exists('form_multiselect')) {
 }
 
 //--------------------------------------------------------------------
+
+if (! function_exists('form_dropdown')) {
+    /**
+     * Drop-down Menu (based on html select tag)
+     *
+     * @param array<string, mixed>|string $data
+     * @param array<string, string> $options
+     * @param string|string[] $selected
+     * @param array<string, mixed>|string $extra
+     */
+    function form_dropdown(
+        string | array $data = '',
+        array $options = [],
+        string | array $selected = [],
+        string | array $extra = ''
+    ): string {
+        $defaults = [];
+        if (is_array($data)) {
+            if (isset($data['selected'])) {
+                $selected = $data['selected'];
+                unset($data['selected']); // select tags don't have a selected attribute
+            }
+            if (isset($data['options'])) {
+                $options = $data['options'];
+                unset($data['options']); // select tags don't use an options attribute
+            }
+        } else {
+            $defaults = [
+                'name' => $data,
+            ];
+        }
+
+        if (! is_array($selected)) {
+            $selected = [$selected];
+        }
+        if (! is_array($options)) {
+            $options = [$options];
+        }
+
+        // standardize selected as strings, like  the option keys will be.
+        foreach ($selected as $key => $item) {
+            $selected[$key] = (string) $item;
+        }
+
+        $placeholderOption = '';
+        if (isset($extra['placeholder'])) {
+            $placeholderOption = '<option value="" disabled="disabled" hidden="hidden"' . (in_array(
+                '',
+                $selected,
+                true
+            ) ? ' selected="selected"' : '') . '>' . $extra['placeholder'] . '</option>';
+            unset($extra['placeholder']);
+        }
+
+        $extra = stringify_attributes($extra);
+        $multiple = (count($selected) > 1 && stripos($extra, 'multiple') === false) ? ' multiple="multiple"' : '';
+        $form = '<select ' . rtrim(parse_form_attributes($data, $defaults)) . $extra . $multiple . ">\n";
+        $form .= $placeholderOption;
+
+        foreach ($options as $key => $val) {
+            $key = (string) $key;
+            if (is_array($val)) {
+                if ($val === []) {
+                    continue;
+                }
+                $form .= '<optgroup label="' . $key . "\">\n";
+                foreach ($val as $optgroupKey => $optgroupVal) {
+                    $sel = in_array($optgroupKey, $selected, true) ? ' selected="selected"' : '';
+                    $form .= '<option value="' . htmlspecialchars($optgroupKey) . '"' . $sel . '>'
+                            . $optgroupVal . "</option>\n";
+                }
+                $form .= "</optgroup>\n";
+            } else {
+                $form .= '<option value="' . htmlspecialchars($key) . '"'
+                        . (in_array($key, $selected, true) ? ' selected="selected"' : '') . '>'
+                        . $val . "</option>\n";
+            }
+        }
+
+        return $form . "</select>\n";
+    }
+}
+
+// ------------------------------------------------------------------------
diff --git a/app/Language/en/Podcast.php b/app/Language/en/Podcast.php
index a80477b755..bad2860811 100644
--- a/app/Language/en/Podcast.php
+++ b/app/Language/en/Podcast.php
@@ -42,6 +42,7 @@ return [
             'These fields will impact your audience and competition.',
         'language' => 'Language',
         'category' => 'Category',
+        'category_placeholder' => 'Select a category…',
         'other_categories' => 'Other categories',
         'parental_advisory' => [
             'label' => 'Parental advisory',
diff --git a/app/Language/fr/Podcast.php b/app/Language/fr/Podcast.php
index 13004491ce..7d390a00ff 100644
--- a/app/Language/fr/Podcast.php
+++ b/app/Language/fr/Podcast.php
@@ -43,6 +43,7 @@ return [
             'Ces champs auront un impact sur votre audience et votre concurrence.',
         'language' => 'Langue',
         'category' => 'Catégorie',
+        'category_placeholder' => 'Sélectionner une catégorie…',
         'other_categories' => 'Autres catégories',
         'parental_advisory' => [
             'label' => 'Avertissement parental',
diff --git a/app/Views/admin/podcast/create.php b/app/Views/admin/podcast/create.php
index 1686104e7a..b4509d9432 100644
--- a/app/Views/admin/podcast/create.php
+++ b/app/Views/admin/podcast/create.php
@@ -107,10 +107,11 @@
 ]) ?>
 
 <?= form_label(lang('Podcast.form.category'), 'category') ?>
-<?= form_dropdown('category', $categoryOptions, old('category'), [
+<?= form_dropdown('category', $categoryOptions, old('category', ''), [
     'id' => 'category',
     'class' => 'form-select mb-4',
     'required' => 'required',
+    'placeholder' => lang('Podcast.form.category_placeholder')
 ]) ?>
 
 <?= form_label(
diff --git a/app/Views/admin/podcast/import.php b/app/Views/admin/podcast/import.php
index 258ba52fb7..729f30bc34 100644
--- a/app/Views/admin/podcast/import.php
+++ b/app/Views/admin/podcast/import.php
@@ -72,10 +72,11 @@
 ]) ?>
 
 <?= form_label(lang('Podcast.form.category'), 'category') ?>
-<?= form_dropdown('category', $categoryOptions, old('category'), [
+<?= form_dropdown('category', $categoryOptions, old('category', ''), [
     'id' => 'category',
     'class' => 'form-select mb-4',
     'required' => 'required',
+    'placeholder' => lang('Podcast.form.category_placeholder')
 ]) ?>
 
 <?= form_section_close() ?>
-- 
GitLab