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
Commits from token 7.x-1.7 #5014
Commits from token 7.x-1.7 #5014
Comments
…al items with different severity values. Fixes backdrop/backdrop-issues#5014 See: https://git.drupalcode.org/project/token/-/commit/b189c11160e8ef4a517f3e749ac8ebb791c29a99
With re to https://drupal.org/node/2474403 and the respective commit: function token_field_widget_form_alter(&$element, &$form_state, $context) {
if (!empty($element['#description']) && !empty($context['instance']['description'])) {
- $element['#description'] = filter_xss_admin(token_replace($context['instance']['description']));
+ $instance = $context['instance'];
+ if (module_exists('i18n_field')) {
+ $instance = i18n_string_object_translate('field_instance', $instance);
+ }
+ $element['#description'] = field_filter_xss(token_replace($instance['description']));
}
} This is with regards to a contrib module, and AFAIK we don't account for contrib in core that way. Also, that function doesn't exist in Backdrop core, and I wasn't able to find any respective/equivalent. Should that issue/commit be marked as N/A then? Is there a way for this to be overridden and fixed in i18n_field? |
Fixes backdrop/backdrop-issues#5014 See: - https://www.drupal.org/node/2630378 - https://git.drupalcode.org/project/token/-/commit/d9f4e54356922db0b3c0a746095ce1c05ef26b78 - https://www.drupal.org/node/2702379 - https://git.drupalcode.org/project/token/-/commit/cf53b4089dd7d3821aeb93f237eb7c8d656b878b
Thanks @argiepiano 🙏🏼 ...yes, this is how we work on these cross-port issues (I mean that we create multiple PRs linked to the same issue, and we review each PR in its own thread instead of the issue thread as we'd normally do for other issues). It would be impractical to be opening separate issues for each commit, as there are sometimes dozens of them in each cross-port issue. What we often do is to break up the commit history (if we are really behind), and we batch certain versions/tags together, to what seems like a manageable amount of commits each time. Having said that, there might be cases where we break a specific commit out into its own issue, if it is a significant change that warrants separate discussion/decision. I don't recall doing that many times in the past for other crossports though. It's just a rare thing. Another thing to keep in mind is that sometimes we may have crossported a fix independently of the crossport issue, at some time before the crossport issue got created. In that case, we simply link that issue in the issue summary of the crossport issue, and mark the respective commit as done (tick the checkbox next to it in the list). Anyway, back to the issue you mention in the PR, I've responded in there 👍🏼 ...happy to mark it as N/A, however see my comment re code parity when possible (or "harmless" as you said). |
6fa49e9 | Issue #2825841 by hbemtec: Fixed PHP 7.1 compatibility error: Cannot use string offset as an array in _token_token_tree_format_row(). is N/A to Backdrop, since we are already initializing the various relevant values in static $defaults = array(
'id' => '',
'class' => array(),
'data' => array(
'name' => array(),
'token' => array(),
'value' => '',
),
); vs. the 7.x code: static $defaults = array(
'id' => '',
'class' => array(),
'data' => array(
'name' => '',
'token' => '',
'value' => '',
'description' => '',
),
); It has been fixed since 1.7.1 (back in May 2017), in #2697 (commit). |
...OK, I'm done here. Moving to #5013 next. Please review each 7.x commit in the respective PR (links in the summary and the sidebar), and remember to leave a comment here when you have added any comment in any of the PRs. Thanks 🙏🏼 |
I'd like to suggest that you combine backdrop/backdrop#4488 and backdrop/backdrop#4489 into one PR. They both change some of the same lines. |
Thanks @argiepiano ...yes, as I mentioned in another comment on the PR, I have already done that in backdrop/backdrop#4493, where I had to merge the changes of 3 commits from 7.x. |
Regarding the comment above:
The D7 problem was that, on a site with Field Translation enabled, as soon as you enabled Token, the field descriptions were not translated anymore. I've tested enabling Field Translation with Backdrop core (which includes the Token functionality), and this is not happening, so this patch is indeed not needed. However, there is an unrelated bug that prevents the use of tokens in field descriptions. Tokens are simply not replaced. Despite an initial replacement done in this line, the replacement is later reverted. |
@klonos Agreed, this module specific code doesn't belong to core. And seems to be unnecessary, anyway. |
@klonos, wondering if it may be a good idea to create issues for each PR. Right now there is this main issue in |
This list generated with (and then d.org issue links manually added):
git log 7.x-1.6..7.x-1.7 --reverse --no-merges --pretty=format:"- [ ] #xx | [%h](https://git.drupalcode.org/project/token/-/commit/%H) | [%s](https://drupal.org/node/)"
The text was updated successfully, but these errors were encountered: