Chapters
40 Chapters
|
4:19:16
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!
Subscribe to download the code!
-
This Video
Subscribe to download the video!
Subscribe to download the video!
-
Subtitles
Subscribe to download the subtitles!
Subscribe to download the subtitles!
-
Course Script
Subscribe to download the script!
Subscribe to download the script!
32.
Having Fun with the Menu
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
This tutorial is built on Symfony 6 but works great on Symfony 7!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": ">=8.2.0",
"ext-ctype": "*",
"ext-iconv": "*",
"composer/package-versions-deprecated": "^1.11", // 1.11.99.4
"doctrine/doctrine-bundle": "^2.1", // 2.5.5
"doctrine/doctrine-migrations-bundle": "^3.0", // 3.2.1
"doctrine/orm": "^2.7", // 2.10.4
"easycorp/easyadmin-bundle": "^4.0", // v4.0.2
"handcraftedinthealps/goodby-csv": "^1.4", // 1.4.0
"knplabs/knp-markdown-bundle": "dev-symfony6", // dev-symfony6
"knplabs/knp-time-bundle": "^1.11", // 1.17.0
"sensio/framework-extra-bundle": "^6.0", // v6.2.5
"stof/doctrine-extensions-bundle": "^1.4", // v1.7.0
"symfony/asset": "6.0.*", // v6.0.1
"symfony/console": "6.0.*", // v6.0.2
"symfony/dotenv": "6.0.*", // v6.0.2
"symfony/flex": "^2.0.0", // v2.4.5
"symfony/framework-bundle": "6.0.*", // v6.0.2
"symfony/mime": "6.0.*", // v6.0.2
"symfony/monolog-bundle": "^3.0", // v3.7.1
"symfony/runtime": "6.0.*", // v6.0.0
"symfony/security-bundle": "6.0.*", // v6.0.2
"symfony/stopwatch": "6.0.*", // v6.0.0
"symfony/twig-bundle": "6.0.*", // v6.0.1
"symfony/ux-chartjs": "^2.0", // v2.0.1
"symfony/webpack-encore-bundle": "^1.7", // v1.13.2
"symfony/yaml": "6.0.*", // v6.0.2
"twig/extra-bundle": "^2.12|^3.0", // v3.3.7
"twig/twig": "^2.12|^3.0" // v3.3.7
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3", // 3.4.1
"symfony/debug-bundle": "6.0.*", // v6.0.2
"symfony/maker-bundle": "^1.15", // v1.36.4
"symfony/var-dumper": "6.0.*", // v6.0.2
"symfony/web-profiler-bundle": "6.0.*", // v6.0.2
"zenstruck/foundry": "^1.1" // v1.16.0
}
}
9 Comments
Hi guys, sorry for posting in a random thread, but it's just where I am at the moment, and I'm not aware of a better place for such a report🙂
Since the site overhaul, there's a bug regarding "autoplay" feature – the autoplay switch's state is not persisted between pages. The browser console shows this:
Uncaught TypeError: Cannot read properties of null (reading 'autoplay').Feel free to ask for more details and/or debugging.
Hey @Andrey!
We're checking into this. What browser are you using? And is there any extra stack info on that error? I'm sure there's a problem, but we haven't been able to repeat it yet.
Thanks!
I'm using Arc browser, which is based on Chromium. I also tested on Google Chrome and had the same problem there.
There's no (related) errors in the console, not even the one I mentioned above. You guys probably already fixed that.
I found the video player stores some settings in the local storage, including
autoplayNext. I played around while keeping an eye on it, and can report a few scenarios when the problem happens. It is also kinda weird, and sometime nothing happens, but still a high chance for the problem to happen. Other scenarios I had only once and could not repeat. In all the cases, the "Autoplay" switch correctly updates the setting in the local storage, no problem there.falseand I do not interact with the player (i.e. it receives no clicks).truewhen the video is playing and I click on either seek bar or "+10s" button. Very high chance (about 90%).trueby itself when video is playing and reaches an arbitrary point in time, or sometimes just the endscreen (when "Play next episode" button appears). Somewhat high chance (about 70%).truewhen the video is playing and I click on "Next Chapter" below the player. Happened only once, cannot reproduce.truewhen the video is ended and I click on "Next Chapter" in the center of the end screen. Happened only once, cannot reproduce.I hope it helps somehow!
EDIT: I forgot to mention, when
autoplayNextchanges by itself – only the value in local storage is updated, but not the switch. The switch does not reflect the state in local storage when this happens, that why it looks like the setting is not persisted. Now we know it is correctly preserved after all. The real problem is – it changes spontaneously.Unrelated question – would it be possible, if clicking on "new reply" in your notifications had taken you directly to the comments thread? Right now it just opens the page, not even the "Comments" tab. Sorry if I'm being needy😅
Hey @Andrey!
Thanks for the extra info - SUPER helpful. Someone on our team thinks they might know what's up :).
Not needy! I'd say that's a bug that we hadn't noticed yet! We'll handle it - I appreciate you pointing that out.
Thanks!
Hey Andrey,
Thank you for reporting it, we will take a look soon!
Cheers!
hello, when the site loads, the menu appears expanded, how can I change the code so that it loads collapsed by default?
Hey @gverdu!
You should be able to do that by:
A) In your "dashboard" controller, override the
configureDashboard()method.B) Then, call
renderSidebarMinimized()before returning the object:Source for the docs for that method are here https://symfony.com/bundles/EasyAdminBundle/current/dashboards.html#dashboard-configuration
I hope that helps! I also think the collapsed sidebar looks nice. Oh, and remember: once you have clicked the minimize/maximize, that is stored in the browser's local storage and will override this "default" setting of collapsed.
Cheers!
I don't see the submenu links unless I ditch ->setController(QuestionCrudController::class)->setPermission('ROLE_MODERATOR') respectively ->setPermission('ROLE_MODERATOR')->setController(QuestionPendingApprovalCrudController::class) portion of the code. Of course that makes those sublinks unfunctional. I tried the code downloaded from symfonicasts site with the same result.
My code is here https://github.com/petre-sy...
Hey Diaconescu,
Most probably your logged in user does not have that ROLE_MODERATOR somehow. Please, try to log out and log in again, then check the Symfony web debug toolbar, in particular, the Security tab there - it will show you roles that your user has. It should be in "Roles" or in "Inherited Roles" row. If the user does not have that ROLE_MODERATOR role somehow - please, add it first and try again (you may need to log our and log in just in case).
I hope this helps!
Cheers!
"Houston: no signs of life"
Start the conversation!