Install

Works with Drupal: ^10 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 401.23 KB
MD5: 096572762c876e4e95b083d07760ac91
SHA-1: dd416638f249e906625676cf032ee98a27e5e8a1
SHA-256: aa01a6a35cc56c4c2429aac1a30c84f5272210963c0abaca76b429735ab5c024
Download zip 431.55 KB
MD5: 9386610ed37fb81b228c8abf8737763d
SHA-1: 513b2ed9e292e47836b065a3229939b0461efe19
SHA-256: d75d4915d9efe4aadb090b064c60321cf514afdd9c9ed3f5b50c8c7aa2d9d67c

Release notes

Version 3.1.0

New Features

Complete Views Integration for Block Content
The publishing_options_block submodule now includes full Views support with four handler types:

Field Handler: Display publishing option status as Yes/No
Filter Handler: Filter blocks by publishing option status (promoted/not promoted)
Contextual Filter: URL-based filtering (e.g., /blocks/featured/1)
Relationship Handler: Join to publishing options data for complex queries
Comprehensive Documentation
Added seven new documentation files totaling 7,500+ words with 30+ code examples:

README.md - Complete feature overview
QUICKSTART.md - 5-minute setup guide
INSTALL.md - Installation and troubleshooting
VIEWS_INTEGRATION.md - Complete Views API reference
ARCHITECTURE.md - Technical deep dive
CHANGELOG.md - Version history
DOCUMENTATION_INDEX.md - Navigation guide

Breaking Changes

Database Architecture Change

Records are now deleted when publishing options are unchecked, rather than storing selected = 0.

Impact:

  • Cleaner database with only meaningful records
  • Better query performance
  • Views queries now check for IS NULL instead of selected = 0

Migration: After updating, clean up legacy records:

drush sqlq "DELETE FROM publishing_options_option_block WHERE selected = 0;"
drush sqlq "DELETE FROM publishing_options_option_node WHERE selected = 0;"
drush cr

Improvements

  • Enhanced PHPDoc comments throughout service layer
  • Better input validation on all service methods
  • Type casting for database parameters
  • Proper NULL handling in Views query methods
  • LEFT JOIN strategy with extra conditions for efficient pubid filtering

Safety Warnings

Added prominent warnings about data loss on module uninstall. Uninstalling permanently deletes ALL publishing option definitions and associations with no recovery option.

Database Updates
Added update hook publishing_options_block_update_8001() for smooth migration from 2.x
Upgrade Instructions

# 1. Backup your database
drush sql:dump > backup-pre-3.1.sql

# 2. Update module files

# 3. Run database updates
drush updb -y

# 4. Clean legacy records (optional but recommended)
drush sqlq "DELETE FROM publishing_options_option_block WHERE selected = 0;"
drush sqlq "DELETE FROM publishing_options_option_node WHERE selected = 0;"

# 5. Clear caches
drush cr

Requirements


  • Drupal 10.x or 11.x
  • PHP 8.1+ (8.3+ recommended for Drupal 11)
Created by: geocalleo
Created on: 30 Jan 2026 at 18:30 UTC
Last updated: 30 Jan 2026 at 18:30 UTC
New features

Other releases