Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

simple_like_button

18 sites Security covered
View on drupal.org
Simple Like Button

A very simple like button for Drupal. Provides an AJAX-powered "Like" button that shows instant feedback and a running count of likes on content.

Features

  • Instant feedback for end users: increments/decrements like count (+1 / -1).
  • Displays the names of users who liked the content.
  • Works with all entities and bundles (e.g., nodes).
  • Supports all authenticated roles.
  • Not available to anonymous users.
  • Not compatible with Views at the moment.
  • Also embedded in the OpenLucius Drupal distribution.

Requirements

  • Drupal 10 or 11
  • PHP version supported by your Drupal core.
  • Authenticated users (the button is not rendered for anonymous users).

Installation

  1. Enable the module

    • UI: Admin -> Extend (admin/modules)
    • Drush: drush en simple_like_button -y
  2. Place the block

    • UI: Admin -> Structure -> Block layout (admin/structure/block)
    • Place Simple Like Button in a region on the page that displays your entity content, e.g. -> Content region under the main content.
  3. Done! The like button should now appear for authenticated users on pages that show an entity (e.g., nodes).

Permissions

No special configuration is usually required beyond having an authenticated user. The button is intentionally hidden for anonymous users.

How it works

  • Renders a like form (form#like-form) with a button for authenticated users.
  • Tracks and updates a per-entity like count via AJAX submit.
  • Button toggles between "Like" and "Liked" depending on the current user state for that entity.
  • Shows a list of user display names who liked the entity.

Theming & Markup

  • Form ID: like_form (HTML id like-form).
  • A standard is used for submitting/undoing the like.
  • You can target the block region or form ID with CSS to customize layout.

Tip: If your theme hides block titles by default, ensure the block's title settings are appropriate for your layout.

Caching

The block/form is user-specific. Drupal automatically bypasses caching for POST requests. If you are using additional reverse proxies or aggressive caching, ensure authenticated traffic is handled correctly so that the form can submit and the like state can update.

Limitations

  • Not currently compatible with Views.
  • Not displayed for anonymous users.

Automated Test

This module ships with a Functional test that validates the basics:

  • Installs simple_like_button and dependencies
  • Creates a node and sets it as the <front>page
  • Places the Simple Like Button block in the default theme content region
  • Visits <front> as an authenticated user and asserts the like form/button is visible

Troubleshooting

  • Button not showing? Confirm you're viewing an entity route (e.g., a node canonical page), you're logged in, and the block is placed in a visible region.
  • AJAX not updating? Check your browser console, ensure CSRF and session cookies are present, and verify that reverse proxy caches are not interfering.
  • Multiple Like blocks? If you place multiple blocks, make sure they appear on pages that can resolve the current entity; otherwise the block may render without a target entity.

Maintainers

  • Project maintainer: Joseph Olstad
  • Formerly Joris Snoek

Please report issues or feature requests on the module's issue queue on Drupal.org (project page) https://drupal.org/project/simple_like_button .

License

GPL-2.0-or-later (same license as Drupal).

Optional config

Optionally you can configure the block to include/exclude certain pages or sections:

Activity

Total releases
1
First release
Oct 2025
Latest release
6 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.0.0 Stable Oct 16, 2025