- 🇩🇪Germany Anybody Porta Westfalica
@guardiola86 great work! Does this need an update hook or will this work for existing sites as-is?
- 🇪🇸Spain guardiola86
It's been a while since I did the patch, but I think it doesn't need an update hook.
The code has a form with a field for a node id to be used as the terms and conditions node:
In commerce_agree_terms/src/Plugin/Commerce/CheckoutPane/AgreeTerms.php:
$form['nid'] = [
'#type' => 'entity_autocomplete',
'#target_type' => 'node',
'#default_value' => $node,
'#required' => TRUE,
];
However, the terms and conditions may not be a node. Nor are they certain to be on the current site. The current code makes it impossible to enter a URL.
Solution: allow the administrator to enter a link as text, and sanitise it.
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
@guardiola86 great work! Does this need an update hook or will this work for existing sites as-is?
It's been a while since I did the patch, but I think it doesn't need an update hook.