Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: installation problem #54139
    Caf_JS
    Participant

    Hi.

    I’m trying to make the blocks work on my live site. I must be doing some things wrong. I have finished the course but i just need help with this.

    After npm run build, exactly what do i copy to the plugin folder on my live site?

    Please be as detailed as possible, i’ve developed WordPress with PHP, etc, but i’m very new to Javascipt development.

    in reply to: installation problem #53995
    Caf_JS
    Participant

    Hi.

    Great.

    “Also yes, you can use the course plugin as a starting point for future projects.”

    Haven’t tried it yet, but i suppose i only have to do a lot of search-and-replace, right?
    Like this:

    I copy the entire catalogue “gutenberg-course-master” and rename it.

    jsforwp-example-blocks.php
    Just rename the file and the settings like any normal plugin.

    Search and replace in all files for:
    Gutenberg_Courses\Example_Blocks (both strings)
    jsforwpblocks – to my own text domain

    I’m sure there are more. Any more strings you know that should be replaced?

    in reply to: installation problem #53983
    Caf_JS
    Participant

    Hi.

    Great videos, i hope you’ll make a follow up course later with even more advanced stuff about Gutenberg blocks.

    I have not finished the course so maybe it’s in some video later, but do you have a description of how to move the finished blocks to the live site?

    I’m rather new to Javascript/React development. After the “npm run build”, i assume a new directory is created. Exactly what files, and directories, do i need to copy to the plugin folder on the live site?
    Of course, i’m not going to do any development on the live server, so only the files that make the plugin work.

    You can use the course plugin as the example. I want to test to see that all those blocks work on my live site.

    And, when i in the future build my own blocks, i can use your plugin as the starting point, right? I mean, not the exact blocks, but the directory structure, etc.
    And then rename the plugin, namespaces, etc. Any recommendations about that? Strings i have to change, that might be easy to miss.

    in reply to: installation problem #53957
    Caf_JS
    Participant

    Hi again.

    It works now.
    I installed MAMP 4.01 and installed the Gutenberg plugin and the course plugin again. Don’t know what solved it, but now it works.

    in reply to: installation problem #53949
    Caf_JS
    Participant

    Hi.

    When i inspect the code in Chrome, in the editor in WordPress, i get this message below (by the way, i use MAMP 3.3.0 for my localhost):

    react-dom.min.82e21c65.js:110 ReferenceError: isSelected is not defined
    at edit (index.js?1c2d:58)
    at yh (react-dom.min.82e21c65.js:95)
    at lg (react-dom.min.82e21c65.js:120)
    at mg (react-dom.min.82e21c65.js:120)
    at gc (react-dom.min.82e21c65.js:127)
    at vb (react-dom.min.82e21c65.js:126)
    at ub (react-dom.min.82e21c65.js:126)
    at wg (react-dom.min.82e21c65.js:137)
    at Ze (react-dom.min.82e21c65.js:41)
    bg @ react-dom.min.82e21c65.js:110
    react-dom.min.82e21c65.js:110 Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args%5B%5D=undefined&args%5B%5D= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at Sg (react-dom.min.82e21c65.js:142)
    at m (react-dom.min.82e21c65.js:12)
    at ed (react-dom.min.82e21c65.js:65)
    at If (react-dom.min.82e21c65.js:82)
    at v (react-dom.min.82e21c65.js:84)
    at react-dom.min.82e21c65.js:88
    at rd (react-dom.min.82e21c65.js:91)
    at O (react-dom.min.82e21c65.js:90)
    at yh (react-dom.min.82e21c65.js:104)
    at lg (react-dom.min.82e21c65.js:120)

    in reply to: installation problem #53941
    Caf_JS
    Participant

    Hi.

    It worked when i used the normal command window in Windows 10 (not the one in Atom, don’t know why, but it’s OK).

    I have another question:
    I tested the “Example – Static Block”. It worked, and i could change things in the code. All changes were shown, both in edit view and in the front end.

    But, all the other blocks gave me an error message when i tried to add them into a page:
    “This block has encountered an error and cannot be previewed.”

Viewing 6 posts - 1 through 6 (of 6 total)