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

Store a huge (render) array for reuse?

Hi,

I'm developing a module where one of the elements is a multiple select box. The data for this box is a complex set of a couple of hundred taxonomy terms.

In order to display these terms in a custom form, in the buildForm function I add these terms to a render array. I then add css classes to each of the terms, dependent on their parents, if they have children, and on specific term fields. This processing takes a couple of seconds each time the form is opened.

Drupal "Full Calendar View Plugin" format date (in Popup)

Hi , I installed the Full Calendar View Plugin in my site. I create a view and i shosed the 

Uploading node with field_image through REST API

Hello there! I am using postman to try to create content with file attached. I have read that first you have to upload the file and then create the node referencing the fid. 

When I do that, the REST POST method return:

<message>Unprocessable Entity: validation failed.

field_image.0.target_id: This entity (file: fid) can not be referenced.

</message>

Webform access submissions per user role

Hi, How can I disable the submission "Edit" Buttom (under Operations [Edit, View,Duplicate,Resend,Delete])  for specific user Role. The user can't duplicate the submission , but he still can "Edit". I want when the user click on the "Edit" Button , a message shown like (You are not authorized to access this page.) like in the "Duplicate phase".   
and if can i do that programmatically ?

Which is the session expiration time of a user logged with user_login_submit?

Hi,
in a custom module (on Drupal7) I'm using an hook_menu that authenticates the user using the function:

$form_state['uid'] = $uid; 
user_login_submit(array(), $form_state); 

If the function is successful then the user is logged into the site.

When the user logs in this way, does the user session expire after a certain period?
Is there a way to change this "expiration time"?

Thank you very much

Claudio

Mailmanager send empty body mail

Hi, i am trying to send a mail programmatically. While the mail should be sent, i get the following error from SMTP authentication module (which is setup correctly):

Error sending e-mail from example@gmail.com to example@gmail.com: Message body empty

The hook_module code:

Pages

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