-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
dev/wordpress#66 Re-instate newer variables but with more support for… #18068
Conversation
(Standard links)
|
@seamuslee001 I applied the patch to master and started to upgrade a 5.28 RC site with the legacy structure. After replacing the codebase, all pages caused 500 errors.
I then tried the Nightly download from download.civicrm.org/latest and that was fine. The line that is causing the error is $old = CRM_Core_Config::singleton()->ufSystem->getDefaultFileStorage(); I tried: $old = CRM_Core_Config::singleton()->userSystem->getDefaultFileStorage(); and that gets rid of the 500 error, and I can validate the proper values, and we get default to the 'new' paths and urls. I'll need more time to work on this @christianwach any thoughts? |
@kcristiano @seamuslee001 Yup, agree with Kevin - fixing the typo should make this work as expected. |
@seamuslee001 I took another run at this and with the suggested change and I am OK with it. Can you make the change and then we can do another r-run and get this in 5.29. I think the earlier it's in the better. |
… legacy file systems
34e68d7
to
ad428bc
Compare
@kcristiano @christianwach fixed now |
I've done the following Old Only
New Only
Old and New
However, extensions are broken as the path and URL cannot be found. Add the following to global $civicrm_setting;
$civicrm_paths['civicrm.files']['path'] = '/srv/www/example.org/wp-content/plugins/files/civicrm';
$civicrm_paths['civicrm.files']['url'] = 'https://example.org/wp-content/plugins/files/civicrm'; Re-run
Extensions cannot be found. We can do an override in flushed cache via UI and Paths-URL json https://gist.github.com/kcristiano/64b2aa5969c2dbcf9f2c3eeeba142920 screenshot of extensions I still want to test old and new where the default is the new directories and the old are only there for images/etc. |
Old and New
So it looks like a mix of old and new where Old is being utilized is giving issues. @totten any thoughts? |
@kcristiano just checking i noticed you included a global on |
@seamuslee001 Correct! global $civicrm_paths;
$civicrm_paths['civicrm.files']['path'] = '/srv/www/example.org/wp-content/plugins/files/civicrm';
$civicrm_paths['civicrm.files']['url'] = 'https://example.org/wp-content/plugins/files/civicrm'; Is what is needed. I'll also do a PR to add this to https://docs.civicrm.org/sysadmin/en/latest/upgrade/version-specific/ This looks good to merge. |
I'm going to merge this based on @kcristiano testing |
… legacy file systems
Overview
This re-applies the newer directory lookup functions for wordpress whilst maintaining some backwards compatibility
Before
Non wordpress functions used to derive the upload files directory
After
Wordpress functions used to derive the upload files directory but some legacy call back if needed
ping @totten @christianwach @kcristiano