• Resolved nickerzb

    (@nickerzb)


    I followed your directions exactly:

    1. Install reactpress plugin
    2. On server, cd into apps directory of plugin
    3. Run create-react-app script to generate app
    4. Add slug to reactpress config

    At this point, my index.html in the /public folder of my app is cleared, which obviously causes the app to fail to load when ran.

    Any time that I click the Update Dev-Environment button in reactpress it also clears my index.html entirely.

    Am I missing something or is this an obnoxious bug?

    My setup is in docker compose with the following images:
    – Official wordpress docker image (https://hub.docker.com/_/wordpress)
    – mysql:5.7

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author rockiger

    (@rockiger)

    It looks like, that ReactPress can’t reach the page that gets created.

    Can you confirm that the page with the page slug can be viewed in WP?

    The critical line in the code is:

    
    $file_contents = file_get_contents(site_url() . '/' . $pageslug);
    

    If the page gets created and is viewable, it seems that the site_url() function doesn’t return the right value.

    I don’t know if this could be an issue with the docker image. Is using localWP an alternative for you?

    Thread Starter nickerzb

    (@nickerzb)

    It looks like site_url() is a function that is provided by wordpress yeah? Do you know how WordPress resolves this or sets this? I could probably just print it out and check too, but if you know offhand that’s probably easier. I’m guessing that’s the issue as well. It should have access, as it’s all within the same docker container, but I bet it’s resolving localhost differently.

    Thread Starter nickerzb

    (@nickerzb)

    https://github.com/docker-library/wordpress/pull/142

    This looks like what I need to do. I can provide the current domain/site. I don’t think this is your issue, so I’m going to close this.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Update Dev-Environtment button creates empty file’ is closed to new replies.