Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Blank page without errors. #19

Closed
ghost opened this issue Mar 20, 2019 · 4 comments
Closed

Blank page without errors. #19

ghost opened this issue Mar 20, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 20, 2019

I created an example extension but get an blank page.

The dev and build versions are affected.

Looks like the init method in index.js will not fired at all. The CORS problem seems not related because i don't get an shield icon in chrome. Also installed an CORS addon in firefox with no effect.

A colleague has the same issue. We both working with Linux. Tested it on a mac with the same result.

In our network only port 80 and 443 are allowed. Could this be a problem?

@suevalov
Copy link
Contributor

@danbru-WittGruppe Thanks for filing the issue.

Where do you get a blank page? Extension should be rendered inside of Contentful and only then init function is fired. Could you provide more details?

@ghost
Copy link
Author

ghost commented Mar 20, 2019

@suevalov ah maybe i have a different understanding.

After npm run login i run npm run start. Then i go to http://localhost:1234 and there is the blank page. So i expected that there i will see for example an rendered TextInput field. Nothing more.

How can i use this with contenful? I need to deploy it, right? That means i can't develop in https://localhost:1234 and have to deploy on every change i make?

@suevalov
Copy link
Contributor

@danbru-WittGruppe

http://localhost:1234 is supposed to be blank. The extension renders UI only if used inside of Contentful.

You don't need to deploy it in order to do so. npm run start serves extension from your localhost and only need to go to Contentful and assign your extension to any field in your content type (if it's Field extension) or to a sidebar (if it's Sidebar extension).

Then you go to a content page where extension is supposed to be shown and see it rendered in development mode. Start updating source files and see the hot-reload of the component inside of Contentful on every safe.

npm run deploy is supposed to be used when you finished development and want to publish extension in development mode.

More information:

@ghost
Copy link
Author

ghost commented Mar 20, 2019

@suevalov alright, thanks for clarification. :) Was not clear from the readme to me.

In chrome it works fine, like magic. But in firefox it seams impossible to enable CORS. Tried every plugin i found from addons.mozilla... Then i have to use chrome for extension development.

Thank you so much. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant