When creating a new node of a certain type, I want an SQL insert to be made at the same time. The insert operation needs to use the node ID from the node just created, such as INSERT INTO my_own_db (nid) VALUES ('last inserted node id'). ....
Drupal questions and answers
How to add javascript with #attached in a node which contains a specific paragraph bundle
I need to attach js in all nodes with a specif paragraph bundle. I know how to do this with drupal_add_js, but I prefer don't use it to prevent cache problems. I am trying with hook preprocess_entity but I don't get it, I don't know how to use the function ....
Assign field permission to individual users?
Here the idea is to avoid defining dozens of roles to account for delicate permission requirements of users. Say, on a certain node that has 100 fields, a webmaster may eventually need to define several hundreds of permission sets, many of them are needed for very few users on and ....
can't change the value of ONE button (search page SEARCH button)
I have succesfully changed the search button text of the block but can't seem to get to do this on the search page on the following form_alter both forms enter it and are set but only search_block_form gets affected function MODULE_NAME_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { if(in_array($form_id,)) { $form = "Custom ....
Javascript running twice when not logged in
I have this issue that any custom js (added into theme.info file) script file is runned twice. However, I noticed that it will be runned only once if I am logged in. This happens in Drupal 7. What is the cause? The js script is a clear only having alert("Entered ....
I can't backup my website on a shared server because memory runs out. What can I do?
I have a large Drupal7 website on a shared Hostgator server, and I cannot do automated backups because I always run out of resources. I've tried 2 methods: 1) I first built my own CLI bash file and I set up a cron job to execute it every night. The ....
How to use Views PHP to code if a view exists and has content then echo...
I have a view displaying a list a menu of all the content for a node. It contains a list of all the fields and views on the page, with the output rewritten as a link eg link to field A . I can do this fine for each field ....
How to create a PHP file that returns a list of nodes as XML?
How do I create a PHP file that returns a list of nodes as XML when called if I have a menu structure like this: <GalleryXML> --gallery 1 ---Item 1 ---Item 2 ---Item 3 And I want a url like localhost/getgallery.php this url will then return my gallery as xml, ....
Autopublish content from drupal to wordpress
My question is that i am having a drupal blog and wordpress on different different domains. I am looking for a module so that whenever i publish some content in drupal it should also published in wordpress. ....
How to prevent a field with thousands of files from loading on Edit operation?
I have a process running that renders a PDF to PNGs and attaches those PNGs to a file field. There is one PDF's results per node, but there we have a bunch of PDFs with 10,000+ pages. We've found that this results in the operation of loading an edit form ....
- WordPress questions and answers
- SharePoint questions and answers
- Drupal questions and answers
- Magento questions and answers
- Salesforce questions and answers
- Joomla questions and answers
- Tridion questions and answers
- Craft CMS questions and answers
- CiviCRM questions and answers
- Sitecore questions and answers