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

Folder name must be in string error #129

Open
tricarte opened this issue Mar 24, 2023 · 5 comments
Open

Folder name must be in string error #129

tricarte opened this issue Mar 24, 2023 · 5 comments
Assignees

Comments

@tricarte
Copy link

I've been using the dev branch for a few months and it was working just fine. After updating my wpstarter based project with composer update and then cloning it to a new directory and running composer install it gives the "Folder name must be in a string" error and stops there. Here's the screenshot of the error.

wpstarter-error

I've tried to switch to the master branch and it worked. There is no clue about why and where the error happens. Actually it seems that the error happens in wpconfig step.

Here is my composer.json file

{
	"name": "tricarte/wpready3",
	"type": "project",
	"description": "wpstarter test project",
	"minimum-stability": "dev",
	"prefer-stable": true,
	"license": "MIT",
	"require": {
		"composer/installers": "^1.11",
		"johnpbloch/wordpress": "^6.0",
		"wecodemore/wpstarter": "dev-dev",
		"dg/adminer-custom": "^1.28",
		"wpackagist-plugin/custom-post-type-permalinks": "^3.4.4",
		"wpackagist-plugin/custom-post-type-ui": "^1.9.2",
		"wpackagist-plugin/duplicate-post": "^4.1.2",
		"wpackagist-plugin/pre-publish-checklist": "^1.1.1",
		"wpackagist-plugin/query-monitor": "^3.7.1",
		"wpackagist-plugin/widget-shortcode": "^0.3.5",
		"wpackagist-plugin/bulk-delete": "^6.0.2",
		"wpackagist-plugin/safe-svg": "^2.0.0",
		"wpackagist-plugin/passwords-evolved": "^1.3.0",
		"wpackagist-plugin/better-search-replace": "^1.3.4",
		"wpackagist-plugin/wayfinder": "^1.0.7",
		"wpackagist-plugin/rest-api-toolbox": "^1.4.3",
		"wpackagist-plugin/icon-block": "^1.0.0",
		"wpackagist-plugin/async-javascript": "^2.21.08.31",
		"wpackagist-plugin/gutenberg": "*",
		"wpackagist-theme/blockbase": "^3.0.5",
		"wpackagist-plugin/block-xray-attributes": "^1.1.1",
		"wpackagist-plugin/rollback-update-failure": "3.3.1",
		"wpackagist-plugin/reveal-ids-for-wp-admin-25": "^1.5.4",
		"wpackagist-plugin/show-hooks": "^0.4",
		"wpackagist-plugin/wp-mailhog-smtp": "^1.0.1",
		"wpackagist-plugin/clarity-ad-blocker": "^1.3.220307",
		"wpackagist-plugin/rewrite-rules-inspector": "^1.3.1",
		"wpackagist-plugin/apcu-manager": "^3.1.1",
		"wpackagist-plugin/surge": "^1.0.3",
		"wpackagist-plugin/fluent-smtp": "^2.1.1",
		"wpackagist-plugin/log-http-requests": "^1.3.1",
		"wpackagist-plugin/patchstack": "^2.1.18",
		"wpackagist-plugin/create-block-theme": "^1.1.2",
		"wpackagist-plugin/reusable-blocks-extended": "^0.9",
		"wpackagist-plugin/lorem-ipsum-blocks": "^1.3.0",
		"wpackagist-plugin/wp-console": "^2.3.1"
	},
	"config": {
		"optimize-autoloader": true,
		"allow-plugins": {
			"johnpbloch/wordpress-core-installer": true,
			"composer/installers": true,
			"wecodemore/wpstarter": true
		}
	},
	"extra": {
		"wpstarter": {
			"register-theme-folder": true,
			"templates-dir": "./custom-templates",
			"prevent-overwrite": [
				".gitignore",
				"public/wp-config.php",
				"public/index.php"
			]
		},
		"installer-paths": {
			"public/content/plugins/{$name}": [
				"type:wordpress-plugin"
			],
			"public/content/mu-plugins/{$name}": [
				"type:wordpress-muplugin"
			],
			"public/content/themes/{$name}": [
				"type:wordpress-theme"
			],
			"public/content/{$name}": [
				"type:wordpress-dropin"
			]
		},
		"wordpress-content-dir": "public/content",
		"wordpress-install-dir": "public/cms"
	},
	"repositories": [
		{
			"type": "composer",
			"url": "https://wpackagist.org"
		},
		{
			"type": "git",
			"url": "https://github.com/wecodemore/wpstarter.git"
		}
	]
}

OS: Ubuntu 22.04
PHP: 8.1.16

@gmazzap gmazzap self-assigned this Mar 24, 2023
@gmazzap
Copy link
Member

gmazzap commented Mar 24, 2023

Hi @tricarte

There have been a lot of work in the last weeks in the dev branch. This is because I want to push to have the a RC version soon, and then stable.

It was not my intention to introduce breaking changes, I'll try to find some time soon to investigate.

In the meantime, please do no use "master" that is so far thev2 of WP Starter.

If you want to stay on the "safe side" please require a release, like 3.0.0@beta so you can get one of the releases instead of the dev branch where work might happen.

@tricarte
Copy link
Author

OK, I've started using "wecodemore/wpstarter": "^3.0.0-beta.13" and got back to normal. Thank you.

@gmazzap
Copy link
Member

gmazzap commented Nov 7, 2023

@tricarte I found this issue and it will be fixed in the next release.

I only have a question: in your example, I see you have "prevent-overwrite" for public/wp-config.php. Can I ask why? There are a lot of things in wp-config.php that change dynamically and many settings rely on wp-config.php to be created dynamically.

@tricarte
Copy link
Author

tricarte commented Nov 9, 2023

To be honest, I really don't remember why. Probably misunderstanding of the setting or I've tried adding some custom code to public/wp-config.php which I know I shouldn't. And I think the same thing applies to "public/index.php"?

@gmazzap
Copy link
Member

gmazzap commented Nov 10, 2023

@tricarte public/index.php might get some changes across versions, yes.

Before I release v3 stable, for example, I'll probably change it (even from the last beta). But when a version is stable you can expect no changes on public/index.php, so if you really need it, you could keep it fixed.

But I hope WP Starter could offer better alternatives to whatever reason there's behind editing index.php directly.

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

No branches or pull requests

2 participants