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

How to limit access to a group page to the group administrator ?

I created a custom module to create a /group/ID/tasks page

How to limit access to this page to the group administrator ?

If the current user is administrator of group ID 76, he can access this page :

/group/76/tasks

But if he goes to another group, he must have denied access :

/group/89/tasks

https://git.drupalcode.org/sandbox/zenimagine-3076032

How to limit access to a store page to the store owner ?

I created a custom module to create a /store/ID/tasks page

https://www.drupal.org/project/commerce

How to limit access to this page to the store owner ?

If the current user is owner of store ID 76, he can access this page :

/store/76/tasks

But if he goes to another store, he must have denied access :

/store/89/tasks

403 Forbidden error when creating or editing paragraph type of text and image

I am no longer able to update the pages when I have put content of paragraphs type. I can submit if I edit any other type like Rich text but if I edit text and image type I get a 403 Forbidden error saying I don't have permission to access node this on this server. I am logged in as user 1 administrator.

Views Exposed Filters & Multi-value Date Field

Hi, i'm trying to overcome an issue i'm having with Views. I've exposed a Date (no time) field using the is_not_between operator so the user can enter start and end dates. I've tested this with a Date field that stores a single value and it filters correctly. However we've been unable to get this to work with a Date field that stores multiple values.

I'm not an advanced programmer but I can use hook_form_alter to change the field labels etc. That's not a problem.

formBuilder()->getForm doesnt validate

I´ve used  \Drupal::formBuilder()->getForm() to pass arguments to form and get it, but when I click on submit button , It appears The website encountered an unexpected error. Please try again later. I think that I get the form but not the methods of validation and submit of own form.

I have a button in header view of a content type, It is to add a entity with the information of the current node, that is to say, 

Unable to add REST Client via Guzzle

Hi guys, Trying to set up httpclientmanager via guzzle to make a service call to google cloud.
Installed using https://guzzle3.readthedocs.io/getting-started/installation.html

where should require 'vendor/autoload.php';
 be mentioned? I added to public_html/site/modules/http_client_manager/src/httpclient.php Constructor but still guzzle fails to load,

Pages

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