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

configMap in table 'info' stores absolute paths #4405

Closed
ghost opened this issue Jun 14, 2019 · 6 comments
Closed

configMap in table 'info' stores absolute paths #4405

ghost opened this issue Jun 14, 2019 · 6 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jun 14, 2019

Description

Saw a closed issue #3546 for that, but i still see absolute paths in the configMap field like that:

{"email":"E:\\craft\\temp2\\config\\project.yaml","fieldGroups":"E:\\craft\\temp2\\config\\project.yaml", ...

Maybe because of the windows file paths?

Steps to reproduce

  1. Fresh install
  2. Enable project config, change a config value in cp

Additional info

  • Craft version: Craft Solo 3.1.30
  • PHP version: 7.2.14
  • Database driver & version: MySQL 5.7.14
  • Plugins & versions: -
  • OS: Windows 10
@brandonkelly
Copy link
Member

Most likely a bug in Craft::alias(). We’ll look into it.

@brandonkelly
Copy link
Member

This is fixed for the next release.

To get the fix early, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "dev-develop#3eb805bc82f229d1e2d8b1f075a0089dc7227fd0 as 3.1.30",
  "...": "..."
}

Then run composer update.

@ghost
Copy link
Author

ghost commented Jun 14, 2019

@brandonkelly Thanks for the quick response.

After clearing the configMap field and saving a field, the content shows {"categoryGroups":"@config\\project.yaml","dateModified":"@config\\project.yaml","email":"@config\\project.yaml" ... , so without the path, but still a backslash.

Saving the field again show an error Invalid path alias: @config\project.yaml

Manually changing the content to @config/project.yaml fixes that.

brandonkelly added a commit that referenced this issue Jun 17, 2019

Verified

This commit was signed with the committer’s verified signature.
bbehrman10 Ben Behrman
@brandonkelly
Copy link
Member

Hey @wsydney76 thanks for testing! Do you mind testing once more?

This time set your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "dev-develop#be1a1aa66d32b0704e41e5d3eebec0f61797514f as 3.1.30",
  "...": "..."
}

Then run composer update.

@ghost
Copy link
Author

ghost commented Jun 18, 2019

@brandonkelly

Fresh install (3.1.30), enabling projectConfigFile and saving a field:

{"email":"E:\\craft\\temp2\\config\\project.yaml","fieldGroups":"E:\\craft\\temp2\\config\\project.yaml" ...

Applying the patch, clearing the configMap and resaving the field:

{"dateModified":"@config/project.yaml","email":"@config/project.yaml", ...

When moving the project files to a new location and adding a few more config changes, everything seems to work fine, project.yaml is correctly saved in the new location.

Thanks!

@brandonkelly
Copy link
Member

Great, thanks again @wsydney76!

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