Articles

/themes/custom/zyxpro_light/images/placeholder.png
30th December 2014 Drupal Technical , Drupal Commerce
close

on 30th December 2014 / by fazeela.ma
Drupal Commerce is a software used for integrating commerce, content and community to create engaging web experiences that bring e-retailers more traffic for more results. With Drupal Commerce, online retailers have a simple yet powerful platform and flexibility to integrate a rich commerce experience anywhere within their environment. Drupal Commerce installation. Drupal Commerce provides retailers with a medium to sell their products and services. To install Drupal commerce, install the module from the the following link, https://www.drupal.org/project/commerce. Using drush, drush en commerce -y; I would personally suggest using drush to install the module, as it have many dependencies. Now got to admin -> modules, find commerce from the module list, and enable its dependencies. Install 'Inline Entity Form' module, from https://www.drupal.org/project/inline_entity_form Install using drush, drush en inline_entity_form -y; After installing the module, you could see a new menu item 'store' on the admin bar. Now we can add products, but we are missing content type for product. aren't we? Go to admin -> Structure -> Add content type Create a new content type, say product. Lets give its name as 'product' and 'Add product' as description. Now we are set to add fields. By default, every content type have title and body. Save Content type. Now we are set to add own fields to the content type, Product Image Machine name is automatically generated for the field, would be like field_product_image. Select field type and widget as Image. Click on save. Moving on, here we can set a default image for products, so that this image will show for those products with no image. Click on Save Settings. On this window, we can change the label from 'Product Image' to 'Image', as it looks good as a label. Check the checkbox box for required field, if we want it to be mandatory. Sure it is. Let it be mandatory, how come a customer buy a bag with out knowing how would it look like?. Help Text for letting the user know the purpose of this field. Let it be like, 'Image of the product'. Default Image is used when no image is uploaded. Lets leave it blank as we have already set the image field mandatory. Allow file extensions, here we already loaded with few file extensions, if we want .swf flash files then include it to the end of the listing. File Directory is where these files will be stored. Minimum and Maximum image resolution defines the height and width of the image that we can upload for the field. Maximum upload size - Size of the image. Check Enable Alt and title if wanted. Select 'Number of Values' as 1. Now finally set to save. Color Add next field, Color. Machine field is generated as field_product_color. Lets select the filed type as List(text) and Widget as Select. Go on and add the values to select from, Enter one value per line, in the format key|label. Save. Change the label, Make it mandatory, Enter a help text, Set the default value from the list box. Save Settings. Reference field Select Product reference as the field type. Here, we will get to know why we have installed inline conditions entity form module, Select Inline Entity Form - Single from list box as Widget and move on. Lets leave options list limit empty as it is the limit for the number of products. Here we have the changes in Label, Mandatory checkbox, Help text. This is how it look like at the end. Add products at Admin-> Content -> Add Content -> Product. You can see the reference field in the add product page. The module and its dependencies are mainly used in commerce sites, were the owner can manage his/her products. Drupal Technical Drupal Commerce Drupal 7 Leave a reply Your email address will not be published. Required fields are marked *
/themes/custom/zyxpro_light/images/placeholder.png
30th December 2014 Technical Solution , Website Development
close

on 30th December 2014 / by prince.kr
Authorize.Net ARB is a standard recurring billing system module and gives you the freedom and flexibility to accept recurring payments without the need of a bulky shopping cart system. The users opting ARB payments mode will be charged the first amount of payment the next day after they subscribe on website, then the recurring billing will start after the first membership period. Paypal too is an online payment gateway but the process is too length for a transactions to complete, fee for multiple transactions, no recurring payment options, cannot make a change in the amount variations on subscriptions. PayPal will not notify the users if the following happens: Transaction is approaching Transaction has occurred or not The current transaction was successful This transaction resulted in fault The entered credit card is approaching expiration A dispute occurred The ARB subscriptions has many advantages over getting subscribed to a paypal payment mode. Transaction amount from payment profile regurlary as per the customer need. If subscriptions will vary in terms of cost or frequency. You dont need to save your credit card information. Notifications if a card is expired/ fault. Provides reports for all transactions processed/ on pipeline. Canceling subscriptions can be made in few easy steps. Technical Solution Website Development Leave a reply Your email address will not be published. Required fields are marked *
/themes/custom/zyxpro_light/images/placeholder.png
BY deepa.n
30th December 2014 Drupal Technical , Drupal 7
close

on 30th December 2014 / by deepa.n
Installing Drupal 7 on Ubuntu 14.04 machine is pretty simple. Here is a quick and easy way to setup a Drupal 7 fresh installation. All those new Drupal developers who would want to do a local Drupal setup, please read on. Prerequisites: Development environment PHP 5 MySQL Apache Step 1: Download Drupal 7 Download the newest stable version of Drupal 7 to your local machine (Download) Decompress the file Copy the files and folders to your ‘/home/user/public_html/’ directory OR Run these commands in your terminal: $cd /home/user/public_html/ $drush dl drupal $mv /home/user/public_html/drupal-7.28 /home/user/public_html/drupal7Step 2: Create a new MySQL database Create a new MySQL database and database user using phpmyadmin. OR Create database through your terminal: $ mysql -u root -p mysql> CREATE DATABASE db_drupal7; mysql> GRANT ALL PRIVILEGES ON db_drupal7.* TO 'new-db-user'@'localhost' IDENTIFIED BY 'new-db-password' WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; mysql> quitStep 3: Create a new virtual host directive in Apache. Create a new Apache configuration file ‘drupal7.conf' $vi /etc/apache2/sites-available/drupal7.conf $ln -s /etc/apache2/sites-available/drupal7.conf /etc/apache2/sites-enabled/drupal7.confthen, add the following to drupal7.conf file: <VirtualHost *:80> ServerAdminadmin@drupal7-local.com DocumentRoot /home/user/public_html/drupal7 ServerName drupal7.local ServerAlias www.drupal7.local <Directory /home/user/public_html/drupal7/> Options Indexes FollowSymLinks MultiViews Require all granted </Directory> ErrorLog /var/log/apache2/drupal7-local.com-error_log CustomLog /var/log/apache2/drupal7-local.com-access_log common </VirtualHost>Then, Add to hosts file $sudo gedit /etc/hostsAdd, 127.0.0.1 drupal7.localStep 4: Restart the Apache web server $sudo service apache2 restartStep 5: Set 'files' folder permission $chmod a+w sites/default/files -RStep 6: Install Drupal 7 Open your web browser. Now, type URL as http://drupal7.local and follow the Drupal instructions and you're done. Drupal Technical Drupal 7 Drupal Installation Ubuntu Leave a reply Your email address will not be published. Required fields are marked *
/themes/custom/zyxpro_light/images/placeholder.png
BY deepa.n
30th December 2014 Drupal Technical , Form
close

on 30th December 2014 / by deepa.n
If you are looking for a simple contact form for your Drupal 7 website, just follow the steps below else skip to the bottom of this article for a bit more complex solution. Drupal 7 comes with its own contact form and you can enable it in a few simple steps. Step 1: Enable the contact module Go to Administration » Modules Find the Contact module under core modules Enable it by checking the box Save the changes Step 2: Create the contact categories to display a drop down list of 'Categories'(If required) Go to Administration » Structure » Contact form Click on 'Add Category' link Enter category name, recipient's email id, auto-reply and so on Save the changes Step 3: Grant access permissions Go to Administration » People » Permissions Find the "Contact module" entry Enable 'Use the site-wide contact form' option for anonymous user Save the changes Step 4: Create a menu item for Contact page Go to Administration » Structure » Menus Click on the link - 'add link' corresponding to 'Main Menu' Enter menu link title, path ("contact") Save the changes If you need a more complex contact form or multiple feedback forms check out for Webform module. This module will enable you to create as many forms as you like. Drupal Technical Form Leave a reply Your email address will not be published. Required fields are marked *
/themes/custom/zyxpro_light/images/placeholder.png
29th December 2014 Drupal Technical , Drupal 7
close

on 29th December 2014 / by abhai.sasidharan
Drupal, up until now a PAC (Presentation Abstraction Control) architecture, has taken a step closer to MVC (Model View Controller) architecture. Although nowhere have they mentioned about MVC, the new Drupal 8 is strictly object oriented. Another feature in Drupal 8, that is different from the existing versions of Drupal is that it is not entirely Drupal. Drupal 8 uses many components in symfony like it's ClassLoader, YAML file structure, twig and so on. For a detailed description please visit the Drupal 8 home page. In this article, I will explain how to convert an existing Drupal 7 module to Drupal 8. In Drupal 7, the first steps you follow to create a module is Create a <module name>.info file Create a <module name>.module file Create a <module name>.install file if a schema is required These are the basic steps for a simple module creation. Plugins, css, images, etc can be added as required. This is basically the same in Drupal 8 except we have to follow a yaml file structure in Drupal 8. The <module name>.info file should be renamed as <module name>.info.yml. Say, for a module zyx, if the zyx.info file in Drupal 7 was : name = ZYX description = Some module to something. package = ZYX core = 7.x files[] = zyx.module files[] = zyx.install ; Information added by Drupal.org packaging script on 2013-12-12 version = "7.x-3.0" core = "7.x" project = "zyx" datestamp = "1386880109" In Drupal 8, the zyx.info.yml would be : name: ZYX description: 'Some module to something.' package: ZYX core: 8.x version: 7.x-3.0 project: zyx datestamp: '1386880109' type: module After the <module name>.info.yml file has been defined, you can go to the extend page in your Drupal site and see that the module has appeared in Drupal 8. The <module name>.install and <module name>.module files remain where they are. The schema definition remains unchanged in Drupal 8. The .module file has many changes which we will discuss now. Firstly, hook_menu has been replaced in Drupal 8 by another yml file called <module name>.routing.yml. This is also a requisite for Drupal 8 module. Clear the hook_menu and move it with corresponding yml syntax to the <module name>.routing.yml file in the root of the module folder : In Drupal 7 : <?php function zyx_menu() { $items = array(); $items['zyx/one'] = array( 'title' => 'Zyx entry', 'description' => 'Enter zyx info into database', 'page callback' => 'Drupal_get_form', 'page arguments' => array('zyx_form'), 'access arguments' => array('access zyx content'), 'type' => MENU_NORMAL_ITEM, ); } In Drupal 8 : zyx.routing.yml zyx.form: path: /zyx/one defaults: _title: 'Zyx entry' _form: \Drupal\zyx\Form\ZyxForm requirements: _permission: 'access zyx content' As you can see in the yml file, the path to the form is defined and we notice another difference, which is the form definition has been moved from the .module file to a class in the form folder. We have to create a folder structure in the module folder to implement the MVC part of Drupal 8 i.e., module/ src/ Controller/ Form/ !-- Each form should be in a separate ClassName.php file. If any. Plugin/ Block/ !-- If any. <module name>.module <module name>.routing.yml <module name>.menu.links.yml <module name>.info.yml <module name>.permissions.yml <module name>.install This is standard for all Drupal modules. This is the PSR-4 compatible folder structure (Confer with PSR documentation). The form should be defined in a php file in the Form folder. This is the controller for the form. An example would be, in this case, "ZyxForm.php". Delete the form definition in <module name>.module file and copy it into the controller class definition in the form folder making the changes like below. The form definition for this would be : <?php /** * @file * Contains \Drupal\zyx\Form\ZyxForm. */ namespace Drupal\zyx\Form; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; class Zyx extends FormBase { /** * {@inheritdoc} */ public function getFormId() { return 'zyx_form'; } public function buildForm(array $form, FormStateInterface $form_state) { $form['zyx_data'] = array( '#type' => 'textfield', '#title' => t('Data'), '#size' => 30, '#maxlength' => 200, '#description' => t('Zyx data.'), '#required' => TRUE, ); $form['submit'] = array( '#type' => 'submit', '#value' => t($submit), ); return $form; } public function validateForm(array &$form, FormStateInterface $form_state) { //Code to validate here. Same as Drupal 7. } public function submitForm(array &$form, FormStateInterface $form_state) { //Code to submit here. Same as Drupal 7. } } Secondly, permissions are no longer set inside the .module file itself. You have to include a .permissions.yml file. In Drupal 7 : <?php /** * Implements hook_permission(). * * Access and view content defined. */ function zyx_permission() { return array( 'access zyx content' => array( 'title' => t('Access content for the Zyx module'), ), ); } In Drupal 8 : zyx.permissions.yml 'access zyx content': title: 'Access content for the Address book module' Thirdly, menu links are a separate file named <module name>.lniks.menu.yml unlike Drupal 8 which included it in the hook_menu itself. It is as follows : zyx.form: route_name: zyx.form title: 'Zyx Entry' description: 'Enter zyx info into database' parent: zyx.page Fourthly, any custom page defined in the <module name>.module will also have to be removed from the <module name>.module file. This will have to be moved to the controller folder as a Controller class similar to how form was done only difference is the class to extend : <?php /** * @file * Contains \Drupal\zyx\Controller\DefaultController. */ namespace Drupal\zyx\Controller; use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Url; /** * Default controller for the zyx module. */ class ZyxController extends ControllerBase { //Custom page function(s) here. Copy the functions and from <module name>.module and place it here. } Finally, blocks are implemented as plugins in Drupal 8. If you look at the folder structure mentioned above, you can see that in the plugin folder there is block folder. This is because blocks are no longer defined in the conventional style; hook_block_info(), hook_block_view() have been deprecated. Your block definitions should be in another controller class similar to form. An example : ZyxChow.php <?php /** * @file * Contains \Drupal\zyx\Plugin\Block\ZyxChow. */ namespace Drupal\zyx\Plugin\Block; use Drupal\Core\Block\BlockBase; /** * Provides the ZyxChow block. * * @Block( * id = "zyx_chow", * admin_label = @Translation("Zyx's Chow") * ) */ class ZyxChow extends BlockBase { /** * {@inheritdoc} */ public function build() { // Code to create a block. Just like Drupal 7. //Return a renderable array; } } Here, the @block part in the comment section is a mandatory. It defines the machine name and name of the block. These are the basic things to be changed in a Drupal 7 module to make it work in a Drupal 8 installation. A few key things to remember while migrating to Drupal 8 are the PSR-4 folder compatibility, YAML file and correct syntax to use, all paths should be defined in routing YAML file. Migrating a module to Drupal 8 can be very long and tedious due to the vast differences from Drupal 7 to Drupal 8. There is another way to migrate modules to Drupal 8, which is using a Drupal 8 module called Drupal module upgrader. This module is in its development stages and does the converting fine for modules with a simple file structure, although it is found to be buggy when migrating projects with more than one modules like the coder or devel module. Resources: Drupal 7 to 8 Drupal Technical Drupal 7 Drupal 8 Migration Leave a reply Your email address will not be published. Required fields are marked *
/themes/custom/zyxpro_light/images/placeholder.png
29th December 2014 Drupal Technical , Module Upgrader
close

on 29th December 2014 / by abhai.sasidharan
After the launch of Drupal 8, there is now an incessant need for converting existing Drupal 7 modules to Drupal 8 compatible versions. Due to the substantial changes in Drupal 8 from its previous versions, developers find it hard and time consuming to migrate from D7 to D8. This is mainly because Drupal 8 is object oriented and much closer to an MVC (Model View Controller) architecture, Drupal is no longer a PAC (Presentation Abstraction Control) architecture framework, Drupal follows the PSR-4 folder structure in compatible with symfony component which Drupal 8 uses. A lot of this difficulty can actually be overcome by a module called Drupal module upgrader. This module automates the migrate process of Drupal 7 modules to Drupal 8. This article elaborates on how this is accomplished and troubleshooting the Drupal module upgrader(dmu) module. DMU is still in its development stages but it does a pretty good job upgrading completely simple modules. This module requires that you have Drush installed. This itself is quite a confusing process as Drush 7 is the only compatible Drush version with Drupal 8 and to install Drush 7, composer is required. So for the purposes of this article, I assume, Drush 7 is installed in the system. If it isn't please do : Installing drush. Installing the module The module can be installed like in Drupal 7 itself. Download and extract into the modules folder. In Drupal 8 the modules folder is not in sites/all/ but in $lt;Drupal root>/modules/ folder. There is a simpler method to download and enable the module since there is composer involved. Composer is an application-level dependency manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. DMU uses composer to install and update the module. Go to the command line in your Linux system and navigate to the Drupal installation folder. Type "drush status" to see whether both installation and/or Drush 7 is working. If it is working, type "drush dl drupalmoduleupgrader --select --all". This will list out all the available versions of Drupalmoduleupgrader as you can see in the image. Choose the supported one as the development one will have lots of bugs. This will download the module in the modules folder. Before enabling the module, first navigate into the Drupalmoduleupgrader folder in your command line and type "composer install". This will install dmu and download all of its components as you can see in the image. Here, many of you may get a similar error message like in the yellow highlighted area in the image. Not to worry, this may only be a problem later which I will explain then. After this, return to the Drupal root on command line and enable the module by typing "drush en drupalmoduleupgrader". You will get a message saying module enabled. Using the module DMU provides some commands to analyze and upgrade the modules. For the purpose of this example, we will take the CCK(Content Construction Kit) module and see if we can upgrade it. If the Drupal 7 module is kept in the module folder then type "drush dmu-analyze cck", If it is kept in a sub folder then type "drush dmu-analyze module --path=<tDrupal/modules/path/to/module>". Type "drush help dmu-analyze" for more details. On successfull execution, a detailed description of the changes to be made with links to their changes will be saved as a html file in the root of the module. To upgrade the module, we must run the command "drush dmu-upgrade cck" or "drush dmu-upgrade module --path=<Drupal/modules/path/to/module>". Some of you will get errors like the one shown in the image. This is because of the earlier errors that we ignored. To rectify this, we must navigate once more into the Drupalmoduleupgrader folder on our command line and type "composer update". This will solve the problem. Still if the error persists or the download of filesystem is getting timed out or failed, then you must go to the link here and download zip. Extract the same into the drupalmoduleupgrader/vendor/symfony/filesystem/component/ folder and rename it to Filesystem. Run the upgrade commands again. This will show indexing...done. Now if you look into the cck folder, you will see the yml info file and all the Drupal 8 necessary files. Run "drush dmu-clean cck" to clean the module of all Drupal 7 files and go to extend in your Drupal site and you will see that the cck module has appeared in the list of modules. Enable and use it. Workarounds to common errors CCK is a simple module and therefore indexing it was easy and uncomplicated. There are a few workarounds to make indexing simpler for large modules. Use the --only option in the dmu-analyze or dmu-upgrade command. Example, "drush dmu-upgrade cck --only=<HookMenu>" Use the --path option to analyze or upgrade only one module in a project. Example, in the coder package there are three modules 'coder_sniffer', 'coder_review', 'coder_upgrade'. Here, we need only scan one of these modules with the command "drush dmu-analyze module --path=<Drupal/modules/coder/coder_review>". Even after the dmu-upgrade has executed successfully, enabling your module can still throw off errors and/or give you a white screen death. This is mainly because the program while executing, skips call by references and minute changes like that. If you read your code after dmu-upgrade is done, you will see comment tags @FIXME. This is to indicate where the changes have to manually be done. Almost every change will be mentioned throughout the code and links to the corresponding change records are present in the html file generated by dmu-analyze. Only run dmu-clean after the code is bug free and perfectly functional. Otherwise old code will be removed which had to be changed manually. You can use the --backup option to create a backup of the module before upgrading or cleaning. The Drupal Module Upgrader (DMU) module despite being in the development stages, saves developers a lot of time when upgrading modules to be compatible with Drupal 8. This module is introduced by Acquia, a software-as-a-service company providing products, services, and technical support for open-source web content management platform Drupal much like Zyxware technologies, who is a partner to Acquia. References: Drupal module upgrader Drupal Technical Module Upgrader Drupal 7 Drupal 8 Leave a reply Your email address will not be published. Required fields are marked *
/themes/custom/zyxpro_light/images/placeholder.png
29th December 2014 Drupal Technical , Drupal 8
close

on 29th December 2014 / by abhai.sasidharan
The radical changes that Drupal 8 brought forward have been reflected in Drush 7 as well. Drush 7 now uses composer to download its dependencies. Before installing Drupal 8 you must make sure that Drush 7 has been installed. This is because Drupal 8 can be downloaded and installed using Drush like in the previous versions of Drush and also, Drupal 8 only supports Drush 7. Unlike earlier versions, Drush 7 cannot be installed using "sudo apt-get install drush" nor can it be updated by running "drush self-update" because that will result in updating to Drush 6 and no more. Hence the purpose of this article. Drush is a powerful tool to manage routine tasks in a Drupal site. Downloading, installing or enabling modules, running cron and much more can be accomplished using Drush. This is why its important to have Drush 7 before a Drupal 8 installation. Drupal 8 requires minimum version of PHP 5.4. Apache requirements haven't been mentioned, but I recommend apache2.4. After this we can begin installing Drush 7. Installing Composer As I have mentioned earlier, Drush uses composer to install its dependencies, so first we have to install composer. Install composer globally on your system or server because with Drupal 8 composer will be required quite often. To download composer, you will have to run the command "curl -sS https://getcomposer.org/installer | php". Make sure you have permissions. Run this command from the home folder. If curl is not installed in your system, run "sudo apt-get install curl". curl is a tool to transfer data from or to a server, using one of the supported protocols. Run "man curl" for more details. After it has been downloaded, run "sudo mv composer.phar /usr/local/bin/composer". Now you can run "composer --version" to see if its working. Installing Drush Remove any earlier versions of Drush if installed, otherwise it will cause conflicts. Run "composer global require drush/drush:dev-master" from the home folder. Make sure you have permissions or run with sudo. This will give you the latest version of Drush. If all goes well you will see an output like this : Changed current directory to /home/user/.composer ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) - Installing pear/console_table (1.1.5) Downloading: 100% - Installing symfony/yaml (v2.2.1) Downloading: 100% - Installing d11wtq/boris (v1.0.8) Downloading: 100% - Installing drush/drush (dev-master 6ce7202) Cloning 6ce72029d154abe9cf8d0a7c8d7ebf44d511294a pear/console_table suggests installing pear/Console_Color (>=0.0.4) drush/drush suggests installing youngj/httpserver (dev-master#41dd2b7 as 1.0.1) This will install in the directory: ~/.composer/vendor/drush/drush, so we will have to set path. ln -s /home/<linux user name>/.composer/vendor/drush/drush /usr/bin/drush export PATH="$PATH:/home/<linux user name>/.composer/vendor/drush/drush:/usr/local/bin" Run "drush status" to see if drush has been installed. We have to edit the .bashrc file and include the export statement in it, otherwise the PATH variable set will not be reflected in every bash terminal instance. Run "gedit .bashrc" on terminal at the home folder. If .bashrc does not already exist, you can create one now. At the beginning of the document, include the line " export PATH="$PATH:/home/<linux user name>/.composer/vendor/drush/drush:/usr/local/bin" ", save the file and exit. The .bashrc file will be executed every time the terminal or any bash console is run. This will set the PATH variable every time bash runs. Open a new terminal and run "drush status" to see whether this has worked. Troubleshooting If running "drush status" gives an error "drush is not installed. Run sudo apt-get install drush", then either Drush installation did not go as planned or the PATH variable was not set properly. Run "echo $PATH" and check whether Drush path is there in your PATH variable. This is how a normal PATH variable looks in an ubuntu system : /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/user/.composer/vendor/drush/drush:/usr/local/bin Make sure you did not change anything else in the .bashrc file and that you have write permissions. Go to the Drush installation folder: .composer/vendor/drush/drush and check whether Drush has been downloaded there. This can happen if, either you did not have the required permissions or if there was a problem with connection on either end and the request timed out. In that case run "composer global require drush/drush:dev-master" again or navigate to .composer/ folder from terminal and run "composer update drush" To update composer, navigate to .composer/ and run "composer update". This will also update drush/drush:dev-master. Drush is important and essential to work alongside with Drupal.With composer, a powerful dependency manager, it is easier to download and install Drush. Once set up, Drush 7 and Drupal 8 is something that gets any web developer excited! References: Drush Composer Drupal Technical Drupal 8 Drush Linux Leave a reply Your email address will not be published. Required fields are marked * Anonymous (not verified) access_time 29 Sep 2020 - 12:56 hey ! many thanks for this page. I would like to add my story : - I'm using ubuntu via ssh - after having set the $PATH into .bashrc and starting a new ssh session, nothing happened. still the message : "drush is not installed. Run sudo apt-get install drush" - I had to put the PATH config into ~/.bash_profile to make it work. just my two cents ;) kjohnah (not verified) access_time 29 Sep 2020 - 12:56 very helpful guide but the path where composer downloads drush is different on ubuntu 16. So one needs: sudo ln -s ~/.config/composer/vendor/drush/drush /usr/bin/drush and then: export PATH="$PATH:~/.config/composer/vendor/drush/drush:/usr/bin" Also the editing the bashrc file might be unnecessary as it does not affect the output of drush status afterwards Add new comment
/themes/custom/zyxpro_light/images/placeholder.png
29th December 2014 Linux Drivers , Toshiba laptops
close

on 29th December 2014 / by webmaster
We have faced internet connection issues with Toshiba laptops(Basically tried with the model C-850). This is due to the driver issue for both wired connection and wireless. The following article explains how to solve the wired connection driver issue with Toshiba satellite C-850 laptops. You can download the driver from the below mentioned link http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.5/compat-wi… Steps to do: Open a terminal and get the driver downloaded by typing the following command. wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.5/compat-wireless-3.5.1-1-snpc.tar.bz2 sudo apt-get install linux-headers-generic build-essential Now extract the tar file which was downloaded: tar -xf compat-wireless-3.5.4-1-snpc.tar.bz2 Now follow the below mentioned commands cd compat-wireless-3.5.4-1-snpc ./scripts/driver-select alx make sudo make install sudo modprobe alx Now reboot the system. Hope your issue with the wired connection has been solved by this. Linux Drivers Toshiba laptops Leave a reply Your email address will not be published. Required fields are marked *
/themes/custom/zyxpro_light/images/placeholder.png
26th December 2014 Drupal Technical , Drupal 8
close

on 26th December 2014 / by anu.mathew
While am working with Drupal 7 to Drupal 8 module migration I have faced the following issue. Fatal error: Call to undefined function check_plain().As Zyxware is a regular contributor to Drupal, its relevant that we need to upgrade our contibuted modules too. check_plain : Encodes special characters in a plain-text string for display as HTML.while we using check_plain() the string passed through the function is supposed to be used as plain text. So we find out check_plain() have no more use in Drupal 8. :( and they implemented Drupal\Component\Utility\String::checkPlain(). :) So we will use Drupal\Component\Utility\String::checkPlain() For everytime its difficult for us to write the whole thing "Drupal\Component\Utility\String::checkPlain()",so we want use namespace and String::checkPlain() so where ever you have check_plain() replace with String::checkPlain() and use Drupal\Component\Utility\String at the top of it Example: Drupal 7: $keys = check_plain($keys); Drupal 8: use Drupal\Component\Utility\String; $keys = String::checkPlain($keys); Drupal Technical Drupal 8 check_plain Leave a reply Your email address will not be published. Required fields are marked *
/themes/custom/zyxpro_light/images/placeholder.png
26th December 2014 Drupal Technical , Drupal 8
close

on 26th December 2014 / by abhai.sasidharan
YAML is a data serialization language which is easily readable to both humans and computers. It is for this very reason that YAML is being used in Drupal 8. YAML stands for YAML Ain't Markup Language. This is what a Drupal 8 module.info.yml file would look like : name: Zyx Module description: Zyx Module description. ;This is how you comment. Description field is mandatory. package: Custom type: module version: 1.0 core: 8.x dependencies: - node This is how a theme is defined in theme.info.yml file : name: Zyx type: theme description: 'A zyx theme.' package: Custom core: 8.x stylesheets: all: - css/layout.css print: - css/print.css stylesheets-remove: - normalize.css regions: header: Header content: Content sidebar_first: 'Sidebar first' footer: Footer This is how permissions are set in Drupal 8 YAML : # In views.permissions.yml file. access all views: title: 'Bypass views access control' description: 'Bypass access control when accessing views.' restrict access: TRUE This is how routing is set in Drupal 8 YAML : demo.page: path: /demo defaults: _title: 'Demo' _content: '\Drupal\demo\Controller\DefaultController::demo' requirements: _permission: 'access demo content' YAML files are parsed by Yaml.php in Drupal 8. It is a symfony component. Another reason to use YAML is because, .info files are Drupal specific and YAML is a created to provide data serialization. In Drupal 8, not just info files but permissions, routing and settings configuration are also defined in YAML format now. Earlies this was accomplished in the .module file. This makes the code more lean. To describe it in two words, compartmentalization and delegating. Drupal Technical Drupal 8 check_plain Leave a reply Your email address will not be published. Required fields are marked *
Subscribe to