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

Install Stripe with composer Drupal 8

Hi,

I installed stripe with :

composer require stripe/stripe-php

When i try to use Stripe in custom module inside controller, \Stripe\Stripe not found. I try Use Stripe, Use \Stripe\Stripe, nothing work.

How can i use vendor library inside custom controller ?

Thank you

create a new blog

Hello together, I have a problem creating a new blog. On my Drupal website I want to have one site, where I show some videos. This site's name is e.g. movies. On this site I want to post articles with different movies in form of blog entries. One entry for one movie. When I create a blog entry, I have one site with that movie. I have the option to create the next blog entry. When I create one new entry and set the URL on the same name (movies) like the other entry, Drupal says there is already an entry with that name. How can I manage that, so that one entry is above the other.

Custom Normalizer - Rewriting REST Output in an Approproate Way

Hi Everyone,

I am creating a module for Replacing all Relative URLs in the REST Export of Views into Absolute URLs, for consuming in Application. I have actually made this possible, but I am not sure it is the right way to do.

Basically, I have created a module with a service.

ListBuilder URL

How can I put a file url into the operation array?
Example:

$log_file is a url for download the file from file_create_url.

public function getDefaultOperations(EntityInterface $entity) {

$operations = parent::getDefaultOperations($entity);

$operations['download'] = [
'title' => t('Download Log'),
'weight' => 20,
url' => $log_file,
];

}

Thanks.

Drupal 9 InfoParserException

Does it make sense to get this error for a module under development that hasn't even  been activated yet?

Yes, I know, Drupal has not yet been official released.

The website encountered an unexpected error. Please try again later.

Drupal\Core\Extension\InfoParserException: The 'core_version_requirement' key must be present in modules/custom/custom/custommodule.info.yml in Drupal\Core\Extension\InfoParserDynamic->parse() (line 73 of core/lib/Drupal/Core/Extension/InfoParserDynamic.php).

How can we change JS file loading order

Dear All,

I want to load my custom module's js file below the drupal's /core/modules/user/user.js.

I also added js/myfile.js: { weight: -0 }, but didn't work, positive weight not allowed.

Please suggest any solution for that.

Pages

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