Suffix added to plugin name when using wp plugin install <url> - wp-cli

When I try to install the plugin https://github.com/wp-graphql/wp-graphql-woocommerce using:
wp plugin install https://github.com/wp-graphql/wp-graphql-woocommerce/releases/download/v0.10.4/wp-graphql-woocommerce.zip
The plugin will be added with a random suffix added to the plugin-name
/wp-content/plugins/wp-graphql-woocommerce-0ymkp2.
Is this by design or is something weird going on? Currently I am using curl to download the package and install it from the local file.

I ran into this when I was creating a custom plugin. It appears to happen because Wordpress expects a subdirectory at the root of the plugin's .zip file that matches the slug of the plugin.
That is, instead of the .zip file containing:
includes/class-acf-schema-filters.php
includes/class-core-schema-filters.php
.
.
.
vendor/firebase/php-jwt/src/Key.php
vendor/firebase/php-jwt/src/SignatureInvalidException.php
wp-graphql-woocommerce.php
It should instead contain:
wp-graphql-woocommerce/includes/class-acf-schema-filters.php
wp-graphql-woocommerce/includes/class-core-schema-filters.php
.
.
.
wp-graphql-woocommerce/vendor/firebase/php-jwt/src/Key.php
wp-graphql-woocommerce/vendor/firebase/php-jwt/src/SignatureInvalidException.php
wp-graphql-woocommerce/wp-graphql-woocommerce.php
As soon as I changed my plugin to have a subdirectory at the root of the .zip file, Wordpress stopped renaming my plugin directory with a random suffix whenever I updated it.

Related

How do I install QuickSubmit plugin to OJS 3.2.1?

When I go to Plugin Gallery and click on "install quicksubmit plugin", I get a message saying that The loaded plugin file does not contain a folder that matches the plugin name. Where do I save this folder?
I found an explanation on PKP Help that said:
Most plugins should come with a readme file of some sort, and should also list which versions of OJS they are compatible with. To install a plugin, you should simply need to copy the files to the correct plugins subdirectory in your OJS installation. For example, if the plugin you want to install is considered a 'generic' plugin, copy the plugin folder to plugins/generic/; if it is classed as an import plugin, it should go into plugins/importexport; and so on.
But where can I find this plugins/generic/ or plugins/importexport folders?
This error is usually when you trying to direct install latest plugin into previous version of ojs please follow bellow steps to easily install this plugin.
Download the exact released version for your ojs from
https://github.com/pkp/quickSubmit .
Example if you are running ojs 3.2.0 then download the relevant zip
upload this zip file and extract to your ojs/plugins/importexport directory
after extraction login to dashboard and check in tool->import/export plugin will be installed

How can I avoid packing my Eclipse plugin in *.jar archive while building Update Site?

I cab export my plugin manually as a folder and I can set option to unpack *.jar after installation from Update Site. But how can I totally avoid using *.jar archives? Is there a way to build Update Site for my plugin with a folder with its contents except *jar archive?
If you use 'features' to build your update site you can specify the 'unpack the plug-in archive after the installation' option in the feature.xml.
However I think this will still loose any execution bit set on files.
Update:
The 'build.properties' file in a feature can specify additional files to put in the root or other directories. You can specify the permissions for these files:
root=file:filename
root.permissions.755=filename
See the Root file Properties help

Joomla 3 custom plugin installation: add a folder with images from zip to images folder

My custom plugin needs add a folder with images in "images" folder of joomla. Is this possible and if yes how can i tell my install script to take this folder and copy it in images path?
Ok i found a way to do it . In my xml file i added
<media folder="" destination="../images">
<folder>testfolder</folder>
</media>
The primary issues being how to include an archive file with your installation package and then how to deal with zip files using exclusively PHP functionality to un-package and place where you want them.
EDIT
I made an error, the original link didn't contain the required information to create installation scripts to run during your extensions install. The new second link is however specific to doing this. I would recommend storing the images somewhere in you installation package, and manually moving them during installation to where you need them in the images folder using one of the available methods to hook into.
Sorry for the error, good luck!
http://docs.joomla.org/Package
http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Adding_an_install-uninstall-update_script_file

Add a plugin to an installed eclipse rcp software without modifying config.ini

I have an installed eclipse RPC application and I want to add a plugin to it which I just wrote. To acheive this I copied the new plugin into the plugin folder of my application and added the plugin to the list of plugins in the config.ini file found under \configuration\config.ini.
This works, but I don't like messing around with the config file. Is there a way to get new plugins working without adding them to the list or do I have to do this for every single plugin I create?
Have you tried to export is as a plugin and put the resulting jar files inside the dropins folder of your Eclipse RCP?

Grails - specifying a plugin as zip?

In grails, you can install a zip version of a plugin with grails install-plugin myplugin.zip. This adds the file to your project and modifies application.properties. I tried putting the zip in /lib, but other developers are unable to build without first manually running grails install-plugin myplugin.zip.
Is there a way to get the zip file to resolve automatically?
Grails can load a plugin from anywhere. For example, if you add the following to BuildConfig.groovy
grails.plugin.location.jsecurity = "/home/dilbert/dev/plugins/grails-jsecurity"
It will load the jsecurity plugin from the location specified
In-place plugins work a treat for all plugins and updates your application realtime as you are testing. Peter Ledbrook has written a very good blog on this ( http://blog.springsource.org/2010/06/01/whats-a-plugin-oriented-architecture/ ), see the paragraph on 'in-place plugins'.