Working with slugified data

  Рет қаралды 9,826

Strapi

Strapi

Күн бұрын

Пікірлер: 37
@tatemo_labs
@tatemo_labs 2 жыл бұрын
Similar to the other folks, there is a missing step to install and setup slugify: #1: npm install strapi-plugin-slugify #2: (if needed) do what @Bagas RG says below optionally do what @Murray Williams says below :D
@MrJfergs
@MrJfergs 2 жыл бұрын
Seems that I have followed all these instructions but still am receiving a 404 error when sending a get request to this API.
@sebastian.estrada
@sebastian.estrada Жыл бұрын
I'm receiving a 403 error lol
@Shubham-yc6nz
@Shubham-yc6nz Жыл бұрын
@@MrJfergssame
@74Bagas
@74Bagas 2 жыл бұрын
in strapi directory, cd config touch plugins.js open it with code editor paste this code, (example) : module.exports = ({ env }) => ({ // ... slugify: { enabled: true, config: { contentTypes: { article: { field: 'slug', references: 'title', }, }, }, }, // ... });
@contra-poder
@contra-poder 2 жыл бұрын
En contentTypes "article" hay que cambiarlo por "film"
@GerardoRoloff
@GerardoRoloff Жыл бұрын
@@contra-poder eso era!!! muchas gracias yofré, ya estaba por lanzar la computadora por la ventana
@dianallona5425
@dianallona5425 2 жыл бұрын
How did you populate the slug field?
@shravan_andoria
@shravan_andoria 2 жыл бұрын
I have tried all possible ways but that slugify part is not working for me...Please help!!!!!!
@DanielScottFilms
@DanielScottFilms 2 жыл бұрын
Followed the series and at about the 6 minute mark in this video when I try to render the page, I get the following error in my terminal: error - Error: page /film/[slug] getServerSideProps can not be attached to a page's component and must be exported from the page.
@DanielScottFilms
@DanielScottFilms 2 жыл бұрын
Fixed. I had to move "export default Film;" after the getServerSideProps function.
@MrJfergs
@MrJfergs 2 жыл бұрын
Tutorials like this where half the information is missing really are not really worth posting honestly.
@matthewchukwu1306
@matthewchukwu1306 2 жыл бұрын
Thanks a lot for this tutorial
@TkoutiAbdelouahab
@TkoutiAbdelouahab 11 ай бұрын
why you dont just type the real code why i should change it each time, its so confusing and slugify is not working for me somthing is missing
@mateuszkoodziej1908
@mateuszkoodziej1908 Жыл бұрын
for me it worked when I configured the plugin for slugify and specified this path '/slugify/slugs/film/${slug}'. It seems to me that to achieve shorter paths we need to setup another plugin but I'm not very familiar with strapi yet. ~ If works then don't touch it xD Edit 1: sorry I wrote this before the end of the video where the author then does the same thing lmao
@eduAbreu90
@eduAbreu90 2 жыл бұрын
Just check the step "Configuration" in the Github of the plugin and should work fine
@shirshakkandel10
@shirshakkandel10 2 жыл бұрын
I got error when using slug code but using id is fine
@aba3212
@aba3212 Жыл бұрын
okay so it is quite obvious at this point that the slugify plugin breaks Strapi in 2023 After I install the slugify plugin, it says "Uncaught ReferenceError: regeneratorRuntime is not defined" and there a bunch of issues with the packages. Even after uninstalling slugify, the issues in packages remain and the admin panel wont load. Just blank and console errors. Fixes found on forums do not help. I am writing this in March 2023. I am using node v16.14 and Strapi v4.1.2 just like the tutorial. However I am using the latest npm, so npm v8.3. This might be the issue, idk. This is a weak video chapter in an otherwise very good tutorial. Many people would appreciate an updated video of this one, part 10.
@ИгорьЛунин-о5р
@ИгорьЛунин-о5р Жыл бұрын
I have the same problem, but using yarn. After installing strapi-plugin-slugify I have a lot of unresolved dependenices which I have to install manually.
@aba3212
@aba3212 Жыл бұрын
@@ИгорьЛунин-о5р So when I started a new project with the latest version of everything (Strapi 4.9) it works as expected now Still have dependency warnings but it works
@greendsnow
@greendsnow 2 жыл бұрын
what is Slugify?
@nicolasbarthes7622
@nicolasbarthes7622 Жыл бұрын
Same problem here with the slug.... unbelievable ...
@greenshaheen
@greenshaheen 2 жыл бұрын
where is slugify??? it is not in my pannel wtf?
@murraywilliams-wd
@murraywilliams-wd 2 жыл бұрын
Looking at the Straps docs, I found that changing the endpoint to ${process.env.NEXT_PUBLIC_STRAPI_URL}/films?filters[slug]=${slug} and then when trying to access any properties from the { film } just add [0] to grab the first result i.e. {film[0].attributes.title}.
@chikwadonworie4110
@chikwadonworie4110 Жыл бұрын
@@murraywilliams-wd Thank you. You just saved me
@nicolasbarthes7622
@nicolasbarthes7622 Жыл бұрын
it works for me when I put this path inside Insomnia, but not inside getServerSideProps()... any idea please before a nervous breakdown ??@@murraywilliams-wd
@Shubham-yc6nz
@Shubham-yc6nz Жыл бұрын
@@murraywilliams-wd this is filtering and not slug. This is not performant
@Nassocci
@Nassocci Жыл бұрын
This whole tutorial should be reworked, STOP telling people what you can do "wrong" and show them only the right way. You are trying to look smart, but it only shines a very bad light on you And there are a lot of mistakes in this tutorial that someone without extensive knowledge would not be able to figure out. It seems that sometimes you change things off-screen and people have to guess what you did
@greenshaheen
@greenshaheen 2 жыл бұрын
you are doing mostly things on your own. and just copying the code and not even telling us what you did.
@genn.623
@genn.623 2 жыл бұрын
I think this course requires a lot of prerequisites because it is mainly to show how strapi is used with next js so you have to learn the basics of other technologies used here first
@greenshaheen
@greenshaheen 2 жыл бұрын
@@genn.623 the problem is he does the important steps but not in the video in the back.like installing slugify etc
@genn.623
@genn.623 2 жыл бұрын
@@greenshaheen yes I just installed that on my own but you are right. They might have overlooked this detail.
@greenshaheen
@greenshaheen 2 жыл бұрын
@@genn.623 they have given the github code. can you run the app by cloning that repos?
@genn.623
@genn.623 2 жыл бұрын
@@greenshaheen I haven't tried that because I've planned to go through this with the tutorial but the slugify did work when I copied the plugins.js file in my config folder from their strapi-side repo
Authentication with Next.js and Strapi (part 1)
9:41
Strapi
Рет қаралды 23 М.
Generating fake data in Strapi
6:33
Strapi
Рет қаралды 3,3 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Data pagination
9:44
Strapi
Рет қаралды 14 М.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 227 М.
Using Strapi With Supabase Deployed To Render
17:32
Coding After Thirty
Рет қаралды 8 М.
Using Forms in Next.js (Server Actions, Revalidating Data)
10:27
Building data relations in Strapi
8:37
Strapi
Рет қаралды 33 М.
Consume data from Strapi with Next.js
11:03
Strapi
Рет қаралды 34 М.
Components and Dynamic Zones 🚀 Strapi Course #2
23:12
NL Tech
Рет қаралды 7 М.
Making Websites With Next.js And Strapi - [06] - Dynamic Routes
19:51
Watch and Learn
Рет қаралды 17 М.
пранк: псих сбежал из дурдома
0:53
Анна Зинкина
Рет қаралды 1,7 МЛН
🪄Вечная спичка #diy #выживание #поход
1:00
Короче, ВИ
Рет қаралды 2,8 МЛН
Monster My Best Friend 🥹❤️👻 #shorts Tiktok
1:01
BETER BÖCÜK
Рет қаралды 29 МЛН
НИКОГДА не иди на сделку с сестрой!
0:11
Даша Боровик
Рет қаралды 729 М.
В Европе заставят Apple сделать в айфонах USB Type-C
0:18
Короче, новости
Рет қаралды 1,1 МЛН