- Issue created by @pavelculacov
- Assigned to abhishek_virasat
- Issue was unassigned.
- Status changed to Needs review
9 months ago 10:22am 15 March 2024 - last update
9 months ago run-tests.sh fatal error - 🇮🇳India abhishek_virasat
@Utilvideo , I have fixed the issue and created Patch.
- First commit to issue fork.
- 🇨🇦Canada cbovard
Hello Everyone,
I have encountered this same bug and saw in the codebase https://git.drupalcode.org/project/paypal_subscriptions/-/blob/2.0.x/src.../** * {@inheritdoc} */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { $instance = parent::create($container, $configuration, $plugin_id, $plugin_definition); $instance->current_user = $container->get('current_user'); return $instance; }
The
$instance->current_user = $container->get('current_user'); should be $instance->currentUser = $container->get('current_user');
The protected property is:
protected $currentUser;
https://git.drupalcode.org/project/paypal_subscriptions/-/blob/2.0.x/src...abhishek_gupta1 Did a great job with the patch and I have built up more on this to fix the property declaration and some error handling.
I have run tests with a Drupal Commerce install using Commerce Recurring.
- Merge request !5Changing Property name in create function; Adding fallback logic for Order User.. → (Open) created by cbovard
- 🇨🇦Canada cbovard
I added the PR and can test this patch. Please let me know if there needs to be changes or the error handling logic needs to be stripped out.
- 🇲🇩Moldova pavelculacov Chisinau
"I do not agree with the patch. Why can't an anonymous user subscribe on PayPal?
Suggestion: Load the user if they exist. If not, allow an anonymous donation.
I don't think the 'name' value from the user is strictly required. We should make it dependent on whether the user is logged in. If they are logged in, get the name; if not, use 'Anonymous' as the default."
'SUBSCRIBERNAME' => $account->get('name')->value,In my donation charity for girl, it used for anonymous users....
https://hopeforelika.com/donate