Install
Works with Drupal: ^10 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
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 crImprovements
- 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 crRequirements
- Drupal 10.x or 11.x
- PHP 8.1+ (8.3+ recommended for Drupal 11)