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

Because of forUpdate facing issue with query on slave

 protected function buildQuery($ids, $conditions = array(), $revision_id = FALSE) {

    $query = parent::buildQuery($ids, $conditions, $revision_id);

    if ($this->pessimisticLocking && isset($this->entityInfo['locking mode']) && $this->entityInfo['locking mode'] == 'pessimistic') {

      // In pessimistic locking mode, we issue the load query with a FOR UPDATE

      // clause. This will block all other load queries to the loaded objects

      // but requires us to start a transaction.

Converting/Upgrading a Drupal 8 module to 9 (not using Drush)

Hey there, 

I did a quick search and couldn't find much about upgrading/updating modules to Drupal 9. I'm sorry if I missed it, please just point me to right direction. 

Long time Drupal user (5.x was my first experiment with Drupal and I've been on Drupal since the early days of 6 - not using Drush - yet ).

I need some guidance about Drupal 8.x modules/themes upgrading to Drupal 9.

I'm ready to move on to Drupal 9 (currently 8.9) but my theme and slider are not compatible (or at least, have not been updated for 9). Suggestions?

How can I get the menu ui link from a node?

I'm trying to get a specific menu link to a node but we have a giant menu structure with more than one link to the same node.

$menu_links = $menu_link_service->loadLinksByRoute('entity.node.canonical', $route_params, $menu_name);

This code works but $menu_links sometimes has multiple links.  The Menu UI module somehow keeps track of only a single menu link even if there are multiple links in the same menu to that node. I'm calling this the menu ui link, though maybe there's a better way to refer to it.

system_retrieve_file() not working correct

Hello Everyone, 

when I'm calling system_retrieve_file like:

$thumbnail = system_retrieve_file($thumbnail_url, NULL, TRUE, FileSystemInterface::EXISTS_REPLACE);

It will download the image into file system but when I try to print $thumbnail object it will have empty fid (file id). 

Note: when I ran the same code again with the same thumbnail url, it gave me the fid. 

Not sure why at first place fid is empty. 

Download file from authenticated file URL

Thanks in Advance!!

In my site, Some media's assets are stored in private folder. I have a custom form where i am using these media assets. When user load the page they are granted the access to use those medias by "private file download access" module. My question is when user submit the form. These media should be also save in public folder. I am doing this by file_get_contents() function (download file from url). See the below code:

Filter table by ajax submitting not refresh pagination.

Dear Drupal community,

Need help, pagination not reset after filtering table via ajax submitting. Guide me what I am doing wrong.


Subscribe with RSS Subscribe to RSS - Module Development and Code Questions