Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Incorrect values for civicrm_uf_group.name cause spurious "Permission Denied" errors.
Before
On sites where this is an issue, the following steps will cause the error message
name
column in thecivicrm_uf_group
table. If there's a row with the value 'summary_overlay', you may not be able to reproduce the error on this installation. However, if such a row does not exist, you can surely reproduce the error. In my case, I notice all values in thename
column are in the form 'title_with_underscores_[id]', so the value for the "Summary Overlay" profile is 'summary_overlay_7'.After
This PR contains SQL UPDATE statements in the upgrade SQL script for version 4.7.31. For sites affected by this issue, after these SQL queries are applied, the repro steps above do not result in the error message described in step 4.
Technical Details
This PR fixes a particular cause of the error message, specifically: All records in
civicrm_uf_group
have theirname
column in the format 'title_with_underscores_[id]' instead of simply 'title_with_underscores'. For most profiles, this is fine, and is by design, as there was some effort to fix problems with non-unique values in thename
column (for example issues CRM-15952 and CRM-15961).But for the specific profile 'summary_overlay', it is a problem. This profile is referenced by this exact name (without the '_[id]' suffix) in CiviCRM core code. The addition of this suffix is the cause of the error message in this case.
Further, there are other
name
values which are specifically referenced in CiviCRM core code.name
values for those profiles are also addressed by this PR.Comments
Comments in CRM-18300 indicate there are other causes of this error message. This PR is not expected to address those causes.