Viewing 9 replies - 1 through 9 (of 9 total)
  • The code you mentioned works for me without any problems. Therefore, the question would be how you apply it – do you have a child theme, if so, from which parent theme?

    Do you have other plugins active? Deactivate these as a test.

    Thread Starter Sergey Gabrielyan

    (@sergeygabrielyan)

    Hello @threadi. No, I don’t have a child theme. I’ve deactivated all plugins, but the problem hasn’t been solved. There are 5 themes in my project, but only one theme has this problem. I’ve disabled CSS also, but it hasn’t helped also.

    This is the behavior. Video

    I’ve tried many things, but I can’t understand what is the problem

    A lot of plugins are still activated in your video.

    The active theme is relevant for the output in the editor, not any others that are still running in parallel.

    Which is your problematic theme? A self-developed one or one that is available for download elsewhere?

    Thread Starter Sergey Gabrielyan

    (@sergeygabrielyan)

    I deactivated the plugin initially, but when the problem persisted, I reactivated it again.

    I’ve uploaded the theme on GitHub. Link

    I downloaded, installed and activated the package. I can now easily adjust the value for the contentSize in the theme.json. At 200px, the view in the editor is very narrow.

    I have 2 guesses why it doesn’t work for you:
    a) You are using an older WordPress version. I have tested it with the current 6.5.2 – without any plugins.
    b) I get a number of error messages that you should have a look at. If these lead to the loading of something in your project that prevents the theme.json from loading, this could be a reason. The errors are as follows:

    Deprecated: Creation of dynamic property JSXBlock::$name is deprecated in /web/wp-content/themes/fictional-block-theme-master/functions.php on line 174
    
    Deprecated: Creation of dynamic property JSXBlock::$name is deprecated in /web/wp-content/themes/fictional-block-theme-master/functions.php on line 174
    
    Notice: Function register_rest_route was called incorrectly. The REST API route definition for university/v1/manageLike is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /web/wp-includes/functions.php on line 6078
    
    Notice: Function register_rest_route was called incorrectly. The REST API route definition for university/v1/manageLike is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /web/wp-includes/functions.php on line 6078
    
    Notice: Function register_rest_route was called incorrectly. The REST API route definition for university/v1/search is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /web/wp-includes/functions.php on line 6078
    • This reply was modified 6 months, 3 weeks ago by threadi.
    Thread Starter Sergey Gabrielyan

    (@sergeygabrielyan)

    @threadi. Maybe the problem is in my project. I’ve moved that theme to the newly created project, and in that project, there is no problem.

    I’ve done some steps in current project (not newly) to identify the problem, but it hasn’t helped

    • Checked current version of project. It’s 6.5.2
    • Deactivated all plugins again
    • Added define( 'WP_DEBUG', true ); in wp-config.php file to see errors, and then I fixed those errors

    Then, I’ve removed index.html file from templates folder, and problem has been solved.

    Screenshots

    With index.html

    Without index.html

    But I need the index.html file?

    Strangely, that problem is only with that one theme, and only in my current project

    Thread Starter Sergey Gabrielyan

    (@sergeygabrielyan)

    I’ve found the solution. Maybe there was a problem with my project’s database. I’ve just removed fictional-block-theme row from wp_terms table, and the problem has been solved.

    Thanks also to you @threadi , you helped me figure it out too

    Screenshot

    Thread Starter Sergey Gabrielyan

    (@sergeygabrielyan)

    In addition. After activating the theme, and adding content to Site Editor, the theme with the relationship will be added to the database without any problem.

    Thread Starter Sergey Gabrielyan

    (@sergeygabrielyan)

    I was wrong about the solution, I should enable Inner blocks use content width

    Screenshot 1

    Screenshot 2

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘contentSize doesn’t work in theme.json file’ is closed to new replies.