Comments (16)
O boy I feel dumb for not remembering to do that!
Cloning and running your repo works perfectly now, thank you :)
from community-content.
hi @pouyamiralayi , I indeed cloned your fork but did not pull to get the other files :) It is working now and I already tried importing records and it works! Again, thank you! This will speed up my personal project.
from community-content.
Hi Pouyamiralyi, yes i can confirm I use graphQL in my project.
I did add the create actions for importconfig and ImportedItem however after doing this my admin panel would not open. Let me know if you have more success :)
from community-content.
Hi I belive something must have changed in the Strapi plugin system since this tutorial was released. I downloaded the source code for the tutorial here and ran it and everything worked perfectly. Then i updated the version from 3.0.0-beta.18.3 to 3.0.0-beta.19.4 , rebuilt the project and now i receive the following error
I was able to manually resolve this error by adding the "create" action but then my admin panel will no long open and i receive a blank white screen when navigating to localhost:1337/admin
from community-content.
Hi @AnthonyPhan do you confirm using graphql plugin inside your project?
from community-content.
We had this issue with graphql and we provided some default endpoints for CRUD actions to remedy the situation!
from community-content.
Hi @AnthonyPhan until i apply the patch to the tut and it's official repo, you can use this repo which is compatible with Strapi 19.4 beside compatibility with graphql.
what are the changes?
1.basically we do not export the plugin configuration object anymore, instead we must export a function which registers the plugin inside the index.js
file of the plugin's root directory!
2. the getmodels
endpoint of CTB no longer exists and we use content-types
endpoint for the sake of retrieving the details of content types.
Lastly is there any way for me to simply install you plugin into my project? I tried simply replicating your files into my plugins folder
you are doing it correctly. after the replacement, just remove your build directory and issue yarn build
to build the admin with the new changes.
Cheers!
from community-content.
Hi Pouya,
I very much appreciate your help.
I tried cloning your fork and running the code but received the following error.
Note: import method: File Upload
I will continue to investigate on my end to see the reason for the issue.
from community-content.
Hi @AnthonyPhan 403
means you have not allowed access to plugin endpoints in the roles & permissions
plugin. Please follow the instructions on the readme file of the plugin [setup section].
Cheers!
from community-content.
hello @pouyamiralayi ,
I did tried downloading your fork and just copied the import-content plugin in my plugins
directory but after running build
and develop
my strapi won't start with the following:
[2020-04-16T03:07:41.349Z] error Error: [GraphQL] Cannot find action "plugins::import-content.importconfig.findOne". Check your graphql configurations.
at getAction (C:\Users\CRVicente\Development\NodeJs\Strapi\myApi\node_modules\strapi-plugin-graphql\services\resolvers-builder.js:159:11)
at buildQuery (C:\Users\CRVicente\Development\NodeJs\Strapi\myApi\node_modules\strapi-plugin-graphql\services\resolvers-builder.js:97:18)
at buildCollectionType (C:\Users\CRVicente\Development\NodeJs\Strapi\myApi\node_modules\strapi-plugin-graphql\services\type-definitions.js:379:27)
at models.map.model (C:\Users\CRVicente\Development\NodeJs\Strapi\myApi\node_modules\strapi-plugin-graphql\services\type-definitions.js:239:16)
at Array.map (<anonymous>)
at buildModels (C:\Users\CRVicente\Development\NodeJs\Strapi\myApi\node_modules\strapi-plugin-graphql\services\type-definitions.js:228:17)
at buildModelsShadowCRUD (C:\Users\CRVicente\Development\NodeJs\Strapi\myApi\node_modules\strapi-plugin-graphql\services\schema-generator.js:135:8)
at Object.generateSchema (C:\Users\CRVicente\Development\NodeJs\Strapi\myApi\node_modules\strapi-plugin-graphql\services\schema-generator.js:29:7)
at Object.initialize (C:\Users\CRVicente\Development\NodeJs\Strapi\myApi\node_modules\strapi-plugin-graphql\hooks\graphql\index.js:87:9)
at Promise.resolve.then (C:\Users\CRVicente\Development\NodeJs\Strapi\myApi\node_modules\strapi\lib\hooks\index.js:37:28)
Also, is graphQL
plugin required for the import-content
plugin to work?
If I uninstall graphql
however and run develop
, my admin page is blank with the following console error
Strapi: 3.0.0-beta.19.5
Node: 10.15.0
npm: 6.4.1
from community-content.
@istian Are you using the repo from this link:
https://github.com/pouyamiralayi/strapi-import-content-plugin-tutorial/tree/migrate_to_19.4
or this link:
https://github.com/strapi/community-content/tree/master/tutorials/code/import-content-plugin-tutorial
from community-content.
hi @AnthonyPhan , I used the first one as I read that one has the patch for beta 19.4 so I'm assuming it will work to 19.5 as well.
I am not able to get the latter in my admin page doesn't work.
from community-content.
Hi @istian can you confirm that you have the below files inside your plugin controllers
directory?
ImportConfig.js
ImportContent.js
ImportedItem.js
and can you confirm the existence of the following inside your plugin admin/src/index.js
?
export default strapi => {
const plugin = {
blockerComponent: null,
blockerComponentProps: {},
description: pluginDescription,
icon: pluginPkg.strapi.icon,
id: pluginId,
initializer: Initializer,
injectedComponents: [],
isReady: true,
layout: null,
lifecycles,
leftMenuLinks: [],
leftMenuSections: [],
mainComponent: Comp,
name: pluginPkg.strapi.name,
preventComponentRendering: false,
trads,
};
return strapi.registerPlugin(plugin);
}
Cheers!
from community-content.
Also, is graphQL plugin required for the import-content plugin to work?
No! but if you are using the graphQL plugin, you must provide the default crud endpoints for all your content-types (for our scenario ImportConfig & ImportedItem)
Cheers!
from community-content.
hey @pouyamiralayi , I don't have the 3 files in my controllers
directoryand the
admin/src/index.jscontent is also different on my copy. I fixed those and
voila`, it works! Thanks so much for you both for helping me!
Although, I have another annoying issue :) Everytime I click on the import content nav in the left panel, there's always a 404 mini popup error appear and the url is content-type-builder/models
from community-content.
Hi @istian i am glad it works! based on your clarification on the structure of the project, i am sure that your clone is not from migrate_to_19.4 branch. the 404
error is typically because of the recent changes in CTB controllers and we are using the new endpoints, please fork the mentioned branch, follow the setup section in the README and let us know if anything went wrong again.
Cheers!
from community-content.
Related Issues (20)
- [SUBMIT] How to build a music discovery app with React, Redux, and Strapi HOT 1
- Building a custom plugins for Strapi: step- by- step guild HOT 1
- [SUBMIT] How to use schema stitching to merge multiple GraphQL subgraphs with Strapi and Next.js HOT 1
- How to Build a Mobile Food Blog with Flutter and Strapi HOT 12
- [SUBMIT] Building a dynamic pagination component using Next.js and Strapi.
- [SUBMIT] Unleashing the Full Potential of Strapi: A Comprehensive Guide to Customization and Best Practices
- [SUBMIT] A Comprehensive Guide to Customization and Best Practices HOT 10
- [UPDATE OUTDATED CONTENT] Top 7 React UI Packages in 2023: A Comprehensive Guide
- [UPDATE OUTDATED CONTENT] Creating a Strapi Dynamic Zone & Rendering it in Your Nuxt.js App HOT 1
- [UPDATE OUTDATED CONTENT] Build a To-Do App with Strapi GraphQL Plugin and Flutter HOT 4
- [SUBMIT] Implementing Encryption in Strapi: Protecting Sensitive Data at Rest and in Transit HOT 1
- [SUBMIT] A Step-by-Step Guide to Writing Custom Hooks for Strapi HOT 1
- Strapi - Build a blog using Strapi and Next.js - yarn build crashes with Error occurred prerendering page HOT 1
- [Request New Content] How to setup email notifications when content items are assigned to users HOT 18
- [UPDATE OUTDATED CONTENT] How to build a To-do App using Next.js and Strapi HOT 7
- [UPDATE OUTDATED CONTENT] How to Build a Simple CRUD Application Using Flutter & Strapi HOT 4
- [UPDATE OUTDATED CONTENT] Build a To-Do App with Strapi GraphQL Plugin and Flutter HOT 1
- Building a complete food recipe app with react native and Strapi [SUBMIT] HOT 12
- [UPDATE OUTDATED CONTENT] Build a static blog with Gatsby 4 and Strapi HOT 13
- Deployment and Hosting Best Practices for Strapi Applications HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from community-content.