rockiger
Forum Replies Created
-
Sorry to hear that.
I will investigate this.In your
index.html
should be a code block similar to this one:<script> var reactPress = {"api":{"nonce":"a8e6e3733b","rest_url":"http:\/\/reactpress.local\/wp-json\/"},"post":{"ID":110,"post_author":"1","post_date":"2022-09-07 21:03:10","post_date_gmt":"2022-09-07 21:03:10","post_content":"<!-- wp:html -->\n<!-- Please don't change. Block is needed for React app. -->\n<noscript>You need to enable JavaScript to run this app.<\/noscript>\n<div id=\"root\"><\/div>\n<!-- \/wp:html -->","post_title":"vite-test","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"vite","to_ping":"","pinged":"","post_modified":"2022-09-07 21:03:10","post_modified_gmt":"2022-09-07 21:03:10","post_content_filtered":"","post_parent":0,"guid":"http:\/\/reactpress.local\/vite\/","menu_order":0,"post_type":"page","post_mime_type":"","comment_count":"0","filter":"raw"},"user":{"data":{},"ID":0,"caps":[],"cap_key":null,"roles":[],"allcaps":[],"filter":null},"usermeta":""}; </script>
If not, you can add it to your index.html. Or define
reactPress
in your JS/TS code for the dev environment.Did you already choose a page where you embed your React app? You need to this first.
Unfortunately, I don’t understand your problem. Where does it show a white screen? Do you use
create-react-app
orvite
to create your React app?create-react-app
doesn’t work anymore, unfortunately.
Which WordPress environment do you use? Which theme is activated?After an refresh do you see the page?
If you want to change the slug you need to change it in the page.
Can you verify that your
asset-manifest.json
is there? Can you load it from the browser?There should be no difference between logged-in and logged-out users. Except if you protect the page the app is embedded in. In which status is the page?
I see, it seems the
n
is created if a ReactPress app is added to an existing page. You can just delete it.
Only this block is necessary for the React app to work:<!-- Please don't change. Block is needed for React app. --> <noscript>You need to enable JavaScript to run this app.</noscript> <div id="root"></div>
You need to allow
scandir
in your server configuration, otherwise ReactPress can’t find the apps directory.Hi @mackattackwp,
I don’t know if this is a weird configuration of your webspace that is blocking the
scandir()
function.Regarding the tutorial, I would urge going through the written Tutorial: https://rockiger.com/en/reactpress/reactpress-tutorial/ Which is much more up to date.
I don’t know, this is probably a problem with your hosting provider. Maybe you can create a video or something.
Otherwise, I can only refer you to the documentation at: https://rockiger.com/en/reactpress/reactpress-tutorial/
This seems pretty odd. I don’t know how to help besides asking very general questions.
Are you sure JavaScript is working? Are you talking about a live site, that worked before? Can you run JavaScript in the browser’s console? Does the problem appear with different browsers or only with a specific one?First, you should fix your database. It seems to don’t have any space.
Then you can try to delete the
option_name
“repr_apps” from thewp_options
table? And then reload the ReactPress admin page?Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] React app behind login pageHi,
the problem is ReactPress can’t download your protected dashboard page. You need to:
- un-protect the dashboard,
- update the page contents in ReactPress admin
- re-protect the dashboard again.
On step 2 ReactPress will download the WordPress content of the dashboard and inject the React app into the
index.html
page. After that, you should be fine with hot-reloading onhttps://localhost:3000
.Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] Multi languageSorry for coming back to you that late. I never used ReactPress with Polylang. My first guess would be checking the URL to change the locale.
Thank you. Glad it helps you.
Do you use it with CRA or with Vite?It is my best guess. It appears that some data is corrupted in the options. Sorry for that.