This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Downloading a file from Drupal to an external system

Hi, 

My general question is how to get file from Drupal to external system (java). 

1. In Drupal webform module i submit a form with an attachment. 

2. Using /file/{file}: GET, rest endpoint, basic auth i receive url "url": "/system/files/webform/wniosek_o_dostep_do_informacji_p/_sid_/dodaj_zalacznik.ods"

3. I try to call this url http://{website.com}/system/files/webform/wniosek_o_dostep_do_informacji_p/_sid_/dodaj_zalacznik.ods from java client and always get 403 error acces denied. 

Encountered this error: Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException

Hi, I've been working on an offsite payment gateway module. I reached upto the point of redirection, but I cannot receive a proper successful order becoz I hit this error just during the redirection back to site happens. I checked log report, found this:

Path: /checkout/16/payment/return. Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: in Drupal\Core\Routing\AccessAwareRouter->checkAccess() (line 118 of /...../core/lib/Drupal/Core/Routing/AccessAwareRouter.php).

[SOLVED] Creating filter for 2 boolean fields

I have 2 boolean fields in some of my content types and I want to filter content based on the values on these boolean fields. I am editing the built in content view.

For demonstration purposes lets think the fields are `field_boolean_1` and `field_boolean_2`.

I have programmatically added a dropdown like this with hook_form_alter():

Hook for intercept edit user save and redirect on my api

Hello community !

I looking for, the good code for intercept and redirect the save button (/user/1/edit) on my api.

i try this :

How to get session_id in hook_user_login ?

The question is in the title !
I need session_id in hook_user_login.
I can get user name, user id, but no success for sessionid

 I tried  $session_id = \Drupal::service('session')->getId(); //empty

Thanks in advance for your help 

Edit: If I cannot get the id, how can I get the hash that is stored in base ?.

 

Attachments to emails sent with commerce_email module

I'm using the commerce_email module, to send emails to customers upon events fired.

When an order is complete, I do send an email to the customer with info about tracking codes and so o, and want to attach an pdf with further info about tracking, is that possible, and how ?

Thank you in advance.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions