How to create custom drush command in 8.7? - drupal

I just tried this tutorial and it's not working. Could anybody knows or can find a drupal 8 drush 9 custom command tutotial or something? Please!
https://www.droptica.com/blog/creating-custom-drush-9-commands-drupal-8/

Related

chan_ss7 error: installation error with asterisk 11

I am trying to install chan_ss7 version chan_ss7-2.2.0 with asterisk-11.12.0... It shows me following error, make: * No rule to make target ../usr/src/asterisk-11.12.0/ /main/lock.o', needed bymtp3d'. Stop ,Any idea regarding this? Please guide... Many thanks.
if you are trying to install asterisk -11 on Ubuntu, then follow the guide below to complete installation without any issue.
Remember to replace the dahdi and libpri download links with current versions.
http://asterisk-rd.blogspot.co.uk/2012/11/instalacion-paso-paso-de-asterisk-18-en.html
I got it to install, by editing the makefile to point the Asterisk 11 directory, to the source of asterisk 11.
in my case
ASTERISK_PATH=../certified-asterisk-11.6-cert7
it was
ASTERISK_PATH=../source/telephony/asterisk or something like that. You should be fine if you just point it to the right directory.
I hope it helps.

Drush fails with "No release history was found for the requested project ..."

I am new to Drupal and I have a problem with installing Drupal using Drush (at the command prompt).
After I generate a Drush make file named test.make, using http://drushmake.me/ , I wonder how I can install Drupal using this Drush make file in localhost?
I use this command in one directory: drush make test.make -y
After doing so, this warning shows up:
No release history was found for the requested project (test).
How can I resolve this warning and get Drupal installed (using this make file)?
Even though it may be hard to tell, for sure there is something wrong within the content of your make file. More specifically, consider the actual message you got, which is:
No release history was found for the requested project (test).
The "(test)" at the end of the message, is a reference to the Drupal module that you are trying to process in your make file, which you have named "test.make". There is nothing wrong in the name of your make file, only a bit confusing because of the "test" part in it. And the actual message you get is related to "module" named "test". Here is a variation of what this error message is trying to tell you: I cannot find any Drupal module on drupal.org, with a name of "test". And that is because https://www.drupal.org/project/test causes a 404 error (page not found).
There are multiple variations of this problem that lead to similar error messages. Here is just 1 of them: module USASearch, is case sensitive (as explained also in this issue). Look at the "Browse code repository" URL on the project page of this module to see how confusing it may get ...
Bottomline: my experience so far has been that whenever I get this typical Drush message, it's because I made some typo in my module name, or I refer to a module that simply does not exists.
Does this answer help?
The way how Drush is checking for release version, is by the following URL:
https://updates.drupal.org/release-history/project_name/7.x
So make sure your project_name (test) is the valid machine name of the project which is published on drupal.org, by editing your make file.
Here are the curl commands demonstrating both non-working and working scenarios:
$ curl -s https://updates.drupal.org/release-history/non-existing/7.x
<?xml version="1.0" encoding="utf-8"?>
<error>No release history was found for the requested project (non-existing).</error>
$ curl -s https://updates.drupal.org/release-history/views/7.x | head -n10
<?xml version="1.0" encoding="utf-8"?>
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
<title>Views</title>
<short_name>views</short_name>
<dc:creator>merlinofchaos</dc:creator>
<type>project_module</type>
<api_version>7.x</api_version>
<recommended_major>3</recommended_major>
<supported_majors>3</supported_majors>
<default_major>3</default_major>
...
If your project isn't hosted on Drupal, you need to specify/define your custom package handler by --package-handler parameter (see: drush help up).
See also: D7 registry_autoload: No release history was found for the requested project.

Wordpress Install hangs on step 2

I am trying to install wwordpress-3.7.1 to my local server. But the instillation process hangs on step 2. In step 2 it only shows wordpress logo. When i checked at database, i saw that all the table has install correctly. Where is the problem? I have used wamp2.4 for my local server. Please tell me the solution.
I had a similar problem, installing WordPress 3.8.1 on Wamp.
Only the logo was displayed on step 2, but only some tables were installed.
In php.ini, I put 90 instead of 30 for max_execution_time, like :
max_execution_time = 90
It solved my case, and hope that will help.
Inside wamp folder of you wamp server , you can find logs folder.In logs folder you will be able to see logs of apache,mysql and php.Check these files , you may get some idea , where its going wrong. Also enable log errors and display errors of your PHP settings

How to create script with Drush commands?

Is it possible to create file with sequence of drush commands to be executed?
In particular, I would like to write script, that would download and enable more Drupal modules for example script with these lines (pseudocode).
$modules = {"pathauto", "admin_menu", "i18n"}
drush dl $modules;
drush en $modules;
Is it possible without creating custom drush command?
I have already found solution. I can create a script with Drush API and using drush_invoke command I can call another drush commands.

Searching pdfs in Plone 4 on Mac OS

I've got Plone 4 running on Mac OS Server 10.6. I'd like to make it possible for the search facility on my Plone site to search for text within the pdf files which are stored there.
I've searched around, but the closest I can find is information about doing this on Plone 3 with Linux.
Please could anyone help?
The basic idea is the same. You need to install the external "pdftohtml" command line utility. In Plone 4 you don't need to do any other configuration in the ZMI or other places. Once the pdftohtml tool is installed new files being uploaded will get their contents indexed. You can go to the catalog in the ZMI to the indexes tab and "reindex" the "SearchableText" index to also cover already uploaded files.
One way to install system packages on Mac is to use MacPorts (http://www.macports.org/install.php). If you use that approach, you can call:
$ sudo port install poppler
Once that has finished, you should be able to call the tool and see something like:
$ pdftohtml -v
pdftohtml version 0.16.5
Copyright 2005-2011 The Poppler Developers - http://poppler.freedesktop.org
You might need to add /opt/local/bin to the PATH variable of the user running the Plone process.
The documentation for Plone 3 applies for Plone 4 in the same way.

Resources