Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Drupal 8

By editor , 27 November, 2015

Check Drupal custom module standards

Tags

  • Drupal 8
  • Code
By editor , 27 November, 2015

Theme not showing correctly when adding CSS/JS library

Tags

  • Drupal 8
  • Error

Probleme 1.
If you are activated 'Aggregate CSS files' on admin/config/development/performance, Disable it and refresh the page.
If the page display correctly, Probleme is in CSS Aggregation.

By editor , 23 November, 2015

Drupal 8 Menu System

Tags

  • Drupal 8
  • Code
  • Settings

1. Define route in module.routing.yml
Exemple :
module.view.settings:
  path: '/url/to/the/page'
  defaults:
    _controller: '\Drupal\module\Controller\Demo::view'
    _title: ''

By editor , 23 November, 2015

Drupal 8 not Display or Rebuild correctly

Tags

  • Drupal 8
  • Error
  • Settings
  • Server

This is due to file/folder permission. so drupal cant write twig tempory files.

By editor , 23 November, 2015

Drupal Error, Name is not valid for this server.

Tags

  • Drupal 8
  • Error

This is due to trusted host configuration of the serveur. It can produce when you change the domain name or 'trusted_host_patterns'. To resolve the probleme, add your new domain to the DRUPAL_ROOT/sites/SITE_FOLDER/settings.php (Ex: sites/defaults/settings.php)

By editor , 20 November, 2015

Set configuration at the module installation

Tags

  • Drupal 8
  • Code

To set configuration at the module installation

Exemple:
$site_name = \Drupal::config('system.site')->get('name');
// Set the site name.
\Drupal::configFactory()->getEditable('system.site')->set('name', 'My site')->save();

By editor , 20 November, 2015

Return JSON array as resut - Provide Json Interface

Tags

  • Drupal 8
  • Code
  • JSON

You can do that using Symfony JsonResponse.

Exemple 1.
return new \Symfony\Component\HttpFoundation\JsonResponse($array);

By editor , 19 November, 2015

Drupal crash - What can I do !!!

Tags

  • Drupal 8
  • Server
  • Error

As the solution depend on your error, first of all, you must find why drupal crash.

1. First thing is, You must check the serveur error log.
# tail -f /var/log/apache2/error.log

By editor , 19 November, 2015

Create a link with Drupal 8 like l() and url() on D7

Tags

  • Drupal 8
  • Code

Exemple:

By editor , 19 November, 2015

Create the module help page on Drupal 8

Tags

  • Drupal 8
  • Code

Here an exemple : Module name : mymodule

Pagination

  • Previous page
  • 22
  • Next page
Drupal 8

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer