SEOChecker.config is reset on every git push from other environments using Umbraco Cloud
Hi Richard and others,
I mailed you about this, but didn't see any changes regarding this in v2.1, so I thought I'd create it here too. Not sure if a bug or feature request too.
The issue is, that the customer makes changes in the SEOChecker section that is saved in the SEOChecker.config file. When we deploy new code through git, this file is reset to the version in the source control, so all the changes the customer did is lost. Same happens if you touch a document type or template on the live site, which also triggers a git commit.
Steps to reproduce:
Make a change in the SEOChecker section that is saved in
SEOChecker.config
On your local environment, make a change to a
random file that triggers a change in git
Commit the changed file and push it to the live site
Notice that your change in SEOChecker.config is gone
Only solution right now is to do all seo changes on localhost, and commit them through git. But domain settings are environment specific on Umbraco Cloud, so we can't make all the necessary changes on localhost.
Umbraco Cloud automatically keeps git in sync with changes to document types, data types, dictionary items and templates when they are changes from the live environment. Maybe it's possible to achieve the same with this file?
We can't be the only one experiencing this, do anyone else have suggestions on what to do?
For Umbraco Cloud sites you can use Config Transforms to set the specific config you need for each environment (and even each baseline child if you're using that).
I haven't used specifically for SEO Checker but I do use this approach for other /plugin/ packages. I believe Umbraco considers this to be "best-practice."
If we exclude the config from the repo (so it's not deployed) will SEOChecker create the config file in each environment? If not, seems like it's simply a "known issue" when used with Cloud sites.
In the case it's not excluded from the repo, do you recommend deploying a "default" config and then setting per environment settings via the UI?
That is also what I'd suggested, but due to the way SEO Checker set config via the UI, apparently it is not a good solution.
Still, it does seem that once you had defined the correct config, you could create the transforms for that - and since it's per environment only the correct settings would be applied.
I suppose the complexity comes in when you update the config in an environment using the UI - how does that then get back into the transform?
Sorry about my latest reply. I didn't read the thread through, so I thought you were the one who reopened the thread yesterday :)
The issue with a "default" config is that the changes made on each environment via the UI will be overwritten everytime you do any commit to the repository. I think this happens because of how Cloud deploys it's changes. So to actually save the changes made through the UI, I have to do it on localhost, and push the changes through the deploy chain up on live.
I didn't think about adding the file to gitignore. I'm not sure SEOChecker knows to create the file on each environment. I've seen SEOChecker crash in the past due to the config file missing.
I'm not a 100% sure this it how it works, but on Cloud you have two folders. One with the repository, and one with the actual live files (a copy of the repository). Everytime the repository change, the other folder is reset to match the repository folder. This means that even though SEOChecker manage to create the config file automatically, it will be deleted every time the repository changes, as it's not part of the repository.
This is just my own little conspiracy theory. I'll test this out as soon as I get some spare time.
It's on the list for next version to create the config file automatically because indeed if it is missing SEOChecker will not work . In a next update release I will maybe move the file to app_data that will be ignored anyway but is a breaking change for now.
SEOChecker.config is reset on every git push from other environments using Umbraco Cloud
Hi Richard and others, I mailed you about this, but didn't see any changes regarding this in v2.1, so I thought I'd create it here too. Not sure if a bug or feature request too.
The issue is, that the customer makes changes in the SEOChecker section that is saved in the SEOChecker.config file. When we deploy new code through git, this file is reset to the version in the source control, so all the changes the customer did is lost. Same happens if you touch a document type or template on the live site, which also triggers a git commit.
Steps to reproduce:
Only solution right now is to do all seo changes on localhost, and commit them through git. But domain settings are environment specific on Umbraco Cloud, so we can't make all the necessary changes on localhost.
Umbraco Cloud automatically keeps git in sync with changes to document types, data types, dictionary items and templates when they are changes from the live environment. Maybe it's possible to achieve the same with this file?
We can't be the only one experiencing this, do anyone else have suggestions on what to do?
Thanks :)
It's on the list Umbraco cloud improvements. But need to have this both for cloud and non cloud solutions.
Sorry for the hassle for now.
Best,
Richard
It's this fixed? Having the same issue on one of our solutions. Umbraco 7.15.1
Hi,
Make sure not to include /app_data/plugins/seochecker/config/seochecker.config this file holds all the settings. Add to the ignore file maybe?
Best,
Richard
Cool thanks, i Will try that🙌🏼
For Umbraco Cloud sites you can use Config Transforms to set the specific config you need for each environment (and even each baseline child if you're using that).
I haven't used specifically for SEO Checker but I do use this approach for other /plugin/ packages. I believe Umbraco considers this to be "best-practice."
https://our.umbraco.com/Documentation/Umbraco-Cloud/Set-Up/Config-Transforms/#including-transforms-in-umbraco-packages
-Paul
That would be Nice Paul,
But for SEOChecker config is modified via UI as well on each environment, would be nice if you can just exclude configs.
Best,
Richard
Hi Richard -
Ah yes, never as simple as one would hope ;-)
If we exclude the config from the repo (so it's not deployed) will SEOChecker create the config file in each environment? If not, seems like it's simply a "known issue" when used with Cloud sites.
In the case it's not excluded from the repo, do you recommend deploying a "default" config and then setting per environment settings via the UI?
Thanks
Hi Ole
That is also what I'd suggested, but due to the way SEO Checker set config via the UI, apparently it is not a good solution.
Still, it does seem that once you had defined the correct config, you could create the transforms for that - and since it's per environment only the correct settings would be applied.
I suppose the complexity comes in when you update the config in an environment using the UI - how does that then get back into the transform?
-Paul
Sorry about my latest reply. I didn't read the thread through, so I thought you were the one who reopened the thread yesterday :)
The issue with a "default" config is that the changes made on each environment via the UI will be overwritten everytime you do any commit to the repository. I think this happens because of how Cloud deploys it's changes. So to actually save the changes made through the UI, I have to do it on localhost, and push the changes through the deploy chain up on live.
I didn't think about adding the file to gitignore. I'm not sure SEOChecker knows to create the file on each environment. I've seen SEOChecker crash in the past due to the config file missing.
I'm not a 100% sure this it how it works, but on Cloud you have two folders. One with the repository, and one with the actual live files (a copy of the repository). Everytime the repository change, the other folder is reset to match the repository folder. This means that even though SEOChecker manage to create the config file automatically, it will be deleted every time the repository changes, as it's not part of the repository.
This is just my own little conspiracy theory. I'll test this out as soon as I get some spare time.
It's on the list for next version to create the config file automatically because indeed if it is missing SEOChecker will not work . In a next update release I will maybe move the file to app_data that will be ignored anyway but is a breaking change for now.
Best,
Richard
Hi Richard,
It seems like the recommendation is to exclude the config file from the repo, but any new environment will error on app start without the config file.
How soon on the roadmap is the automatic creation of the config file if it's missing?
Mike
Hi Michael,
Scheduled for next release Right after CMSImport release.
Best,
Richard
Thanks Richard!
is working on a reply...