Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra slash from $block_json_file #24829

Merged
merged 1 commit into from Sep 10, 2020

Conversation

aristath
Copy link
Member

Paths are wrong and have a double slash.
We define the $blocks_dir var like this:

$blocks_dir = dirname( __FILE__ ) . '/../build/block-library/blocks/';

then when we build the path for the block JSON file we do it like this:

$block_json_file = $blocks_dir . '/' . $folder_name . '/block.json';

Doing an error_log( $block_json_file ) shows that paths are formed like this:

wp-content/plugins/gutenberg/lib/../build/block-library/blocks//column/block.json

$blocks_dir already has a trailing slash, so the extra slash between $blocks_dir and $folder_name should be removed.

Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

@aristath aristath merged commit 5f0f885 into WordPress:master Sep 10, 2020
@aristath aristath deleted the aristath/remove-double-slash branch September 10, 2020 08:42
@github-actions github-actions bot added this to the Gutenberg 9.0 milestone Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants