Strapi issue.

I am trying to replicate the invoice generator from here: https://refine.dev/blog/refine-react-admin-invoice-genarator/ everything was okay until Company list page, while i am able to login using my username and password for a strange reason when Your companies loads there are no data to show even if I added a company from Strapi backend. Any ideas? Thanks in advance! 🙂
Develop your Own Customizable Invoice Generator with Refine and Str...
Looking for an invoice generator? Try out Refine. With our custom interface, you can build your own invoice in minutes! Learn more here.
34 Replies
Omer
Omer2y ago
Hey @.happy3 , Could it be related to permissions? Does the user you log in with have GET permissions for company collection? 👀
confused-chocolate
confused-chocolate2y ago
Good morning, sorry for the late response, here are my settings, the issue I am facing from the UI and console log i get.
No description
No description
No description
No description
Omer
Omer2y ago
Could you share your network tab?
confused-chocolate
confused-chocolate2y ago
Sure!
No description
confused-chocolate
confused-chocolate2y ago
and this is when i call it in source code
No description
Omer
Omer2y ago
Could you share companies request on your network tab?
confused-chocolate
confused-chocolate2y ago
here
No description
confused-chocolate
confused-chocolate2y ago
api calls seems okay!
Omer
Omer2y ago
confused-chocolate
confused-chocolate2y ago
Sure i will give it a try again!
Omer
Omer2y ago
by the way, could your field names be different with the example?
confused-chocolate
confused-chocolate2y ago
Good morning! Connected the example from github to my strapi instance. Still facing the same issue, I will read more on strapi documentation maybe i can find the problem there.
Omer
Omer2y ago
Could you share response tab of "companies" request?
confused-chocolate
confused-chocolate2y ago
also i tried contacts, I am able to add contacts in strapi from frontend, it creates an empty record, and if I add a record in backend it is not displayed on frontend
No description
No description
No description
Omer
Omer2y ago
Could you share "Response" tab of Network request?
confused-chocolate
confused-chocolate2y ago
No description
Omer
Omer2y ago
Hey, We've added a Live example to our blog post and the example works as expected. https://refine.dev/blog/refine-invoice-generator/#live-stackblitz-example Could you compare your code with the example project?
Building an Customizable Invoice Generator App with Refine, Strapi ...
Looking for an invoice generator? Try out Refine. With our custom interface, you can build your own invoice in minutes! Learn more here.
confused-chocolate
confused-chocolate2y ago
Sure thank you! 🙂 Works perfect. With the working example i found out that tha issue was from strapi end. Installed a new instance set it up etc and works.
Omer
Omer2y ago
Hooraayy!! parrot
extended-salmon
extended-salmon2y ago
can you tell me how you fixed strapi? I am facing the same issue, the code works if API_URL is equal to refines api endpoint. but when i connect it to localhost:1337 i get this same screen you sent earlier. thanks for your help 🙂
No description
Omer
Omer2y ago
Hey @.happy3 👋, Could you help?
confused-chocolate
confused-chocolate2y ago
Good morning! Sure! @rogueripple do you have your code in a git repository? From what I can see from your screenshot you get the email but not the rest of the fields. First update Strapi to the latest and check your api names that are correct. If you just cloned the repo and created the strapi instance, maybe it will better and easier if I provide you with a step by step instructions on how to set it up from the start. Give it a try and if you still facing this issue do not hesitate to contact us!
extended-salmon
extended-salmon2y ago
Thanks for your quick response @.happy3 , here is the strapi backend i spun up https://github.com/emtechgroup/strapi-invoice and here is the frontend i cloned from refine example https://github.com/emtechgroup/invoice-frontend
confused-chocolate
confused-chocolate2y ago
I will have a look as soon as I arrive at the office! 🙂
Omer
Omer2y ago
Hey @rogueripple 👋 , Wow, I didn't know about this repo. Where did you find it?
extended-salmon
extended-salmon2y ago
so i was able to get company data to show up when i went into strapi gui backend and changed the input fields from capital to lowercase ie: Name to name, Address to address, etc. logo is still not showing yet, for the client page i am able to write to db but after submitting the frontend page goes white, so i have to go into strapi gui and remove the client data to unbreak the site. and under the contact page i am able to write to db but the option for choosing company does not give option to add company to the dataset
No description
No description
extended-salmon
extended-salmon2y ago
@Omer i think i pulled the invoicegenerator code from here https://github.com/refinedev/refine/tree/master/examples/blog/invoiceGenerator
Omer
Omer2y ago
GitHub
GitHub - emtechgroup/invoice-frontend: refine invoice generator fro...
refine invoice generator frontend. Contribute to emtechgroup/invoice-frontend development by creating an account on GitHub.
extended-salmon
extended-salmon2y ago
yes that is my repo i uploaded earlier so Happy could take a look at the code for the frontend error i posted. that emtechgroup/invoice-frontend repo is a clone of refine/tree/master/examples/blog/invoiceGenerator
Omer
Omer2y ago
hmm, will it be helpful if I share the api folder of our Strapi backend ?
extended-salmon
extended-salmon2y ago
yes! i think this will allow me to check my strapi code to ensure i am configuring it to work correctly with your invoicegenerator frontend. I would very much appreciate it.
confused-chocolate
confused-chocolate2y ago
Btw for the image issue you should run strapi as production, had the same issue. @rogueripple did you solve the issue?
extended-salmon
extended-salmon2y ago
@.happy3 yes sir, thank you Happy and thank you @Omer , i was able to see the api folder and get strapi configured correctly locally. now i get to go through code further and try to master refine and strapi. this platform is amazing for wannabe coders!!! thank you guys!