How to programmatically query a CCK field in Solr Search API index application
The following codes will query the "title" field in Solr Search API index application:
The following codes will query the "title" field in Solr Search API index application:
A client asked me to work on one particular page of his existing Drupal site to have its own different separate domain. This is one good solution if you have special web page that you want to quickly improve ranking on search engines.
Lets say, the http://www.webfoobar.com/node/88 is the page that we want it to have its own domain "test7.webfoobar.com". The following steps will accomplish this task:
If a website is trying to access web static files from different URL domain, broken web assets and the following error will occur:
Access to Font at 'https://www.webfoobar.com/sites/webfoobar.com/themes/custom/mybootstrap/fonts/sniper.woff?1887860575' from origin 'https://test7.webfoobar.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://test7.webfoobar.com' is therefore not allowed access.
The task is to change all path values in HTML attributes src
and href
from relative to absolute URL in a Drupal site by altering Drupal final HTML output.
We can just use the following codes to target links:
If your client's site setup is complicated and you don't have time to replicate it in your local machine, your choice is to debug it directly. This article will show steps on how to debug a website's PHP codes remotely in a server with firewall specifically hosted in Linode server running Centos 7 64-bit Linux distribution, PHP-FPM (FastCGI Process Manager) and PHP 7.0 (the server is running multiple PHP versions).
The following are the steps on how to create new PhpStorm project from your site's remote server:
Open your PhpStorm program and click the "Create New Project from Existing Files" option:
This guide will show how to display Drupal taxonomy terms' hierarchical structure in Views. It is assumed that you have already existing setup of your own taxonomy terms hierarchical structure, a content type which has a field referencing your vocabulary with taxonomy terms hierarchical structure and posted nodes of this content type tagged with one of these taxonomy terms.
In this guide we will use the Drupal vocabulary that has the following structure as our example:
I had a Drupal project where the website is hosted in shared web hosting and the issue was all its page's URL contains root path like for example: http://example.com/home/roland/public_html/contact
(this URL should only be http://example.com/contact if without root path). We know that in shared hosting we don't have control in Apache web server's configuration files but we do only have the .htaccess to do some Apache stuffs. How can we remove the root path /home/roland/public_html
from all our Drupal site's URL?