FolderShare Release Notes

8.x-1.7.0, 08/22/2022

Requires PHP 7.2+ and Drupal 8.7+

Administrator features

New features:

Added support for custom file stream wrappers.
Custom stream wrappers can now be used to change where FolderShare stores all files. The stream wrapper that FolderShare should use can be configured in the File storage section within the "Files" tab inside the FolderShare settings form. For example, you can now store FolderShare files on S3 by installing the S3 File System or Flysystem S3 modules (which provide an S3 stream wrapper) and selecting this stream wrapper in the FolderShare settings form.
Help information updated.
The module's admin help page has been updated to mention the added support for custom file stream wrappers (e.g., s3://, etc.).

Bugs fixed:

Error when saving the FolderShare settings form (and the Search module is not enabled).
Fixed.
Error when upgrading to FolderShare 1.6 (and the Search module is not enabled).
Fixed.

8.x-1.6.0, 7/18/2021

Requires PHP 7.2+ and Drupal 8.7+

Module update required. Run the update using the administrator's web UI or "drush updb". The update propagates search settings from the core Search plugin to the FolderShare module where they are used by Search API features as well. The update also flushes all caches and loads updated routes, libraries, and etc. The module will not function properly until the update is done.

User interface

New features:

Links pseudo-field for entity-related links.
Modeled after the Node content type, FolderShare entities now include an optional "Links" pseudo-field that may be shown and positioned on an entity view page. Hooks may add links (see "hook_foldershare_links_alter") and the Comment module, if in use, can add links for the comment form.

Removed features:

Folder-constrained search from folder browser search box removed.
A folder-constrained search only searches from the current folder downward through its folder tree. While this has worked, it has never worked well. The search is inherently slow because it requires a recursive traversal through a potentially large folder tree. The resulting list of folder tree descendents used in the search can be large and overflow limits in the database drivers (particularly for SQLite). Further, such a search could only be started from the folder browser search box and only when using the core Search module, not the Search API module. Becuase of these significant problems, it has been removed. All searches from the search box are now global, just as they are from a search block or search form page.
Administrator features

New features:

Added support for Search API module.
The Search API module is now supported as an alternative to the core Search module. Search API supports partial word matches and an ecosystem of additional search features.
Added support for Search API Pages module.
The Search API Pages module is now supported to provide a simple search form and results. This is an alternative to using Views, which is supported by the Search API module itself.
Added support for Search API Autocomplete module.
The Search API Autocomplete module is now supported from the folder browser search box. The module uses the Search API, when using a View search page, to produce an autocomplete menu while entering search keywordsa.
Added support for file content indexing using Search API.
Support for searching files and folders using the Search API supports searching through file content as well as file names and descriptions. File content search indexing is controlled from the module's admin settings page. The same features are also supported when using core Search.
Checkbox added to admin settings to enable/disable folder browser search box.
For sites that do not need the search box on the toolbar of the folder browser, a checkbox on the module's settings page enables/disables it.
Menu added to admin settings to select a search provider for the folder browser search box.
When core Search and Search API are both installed at a site, a menu on the FolderShare admin settings page selects which one should receive queries typed into the search box on the toolbar of the folder browser.
Fields added to admin settings to configure folder browser search box for Search API.
When using core Search, the search box sends entered keywords to the module's search plulgin. But with Search API, the search box has new fields on the FolderShare admin settings page to select the search form path, query name, and URL style for the search form to receive the search box keywords.
Help information updated.
The module's admin help page has been expanded to discuss configuration features and, in particular, settings for core Search and the Search API.

Bugs fixed:

Comments not added to the search index.
Fixed. Even with comments enabled for FolderShare entities, their text was silently skipped during search indexing because a bug concluded the comments had been intentionally hidden.
Content removal links on module uninstall don't remove gracefully.
Fixed. When uninstalling the module, content has to be removed first. Links on the uninstall page do this but default to core features that do not understand the folder tree and file management of FolderShare. These links have now been redirected to module-specific code to
Folder browser menu items not sorted based on locale.
Fixed. Menu items with punctuation, numbers, mixed case, and accents were not sorted in a locale-relevant way. While this did not affect the sort order of built-in menu items, it did affect plugin menu items from other modules. It now uses locale-sensitive sorting that ignores case, accents, and punctuation, and does proper numeric sorting.
Folder browser menu commands that post status messages create an empty error dialog.
Fixed. When a menu command posts an error or warning message, it is shown in a dialog after the command fails. A status message also triggered the dialog, but showed nothing. The dialog is no longer triggered and the status message is shown on the page like other status messages.
Internal "systemhidden" field is viewable, but should not be.
Fixed. The internal field was marked as viewable, though it contains internal implementation information only. It is no longer viewable.
Refresh after menu item dialog delayed.
Fixed. For menu items with dialogs (e.g. delete's confirmation or rename's new name prompt), closing the dialog failed to refresh the browser list for up to 5 seconds. It now refreshes immediately.
Rendered item view of FolderShare entity doesn't include name.
Fixed. The file or folder name was not include in the rendered item view. It now is.
When using core Search, 1-minute core Search indexing is too frequent.
Fixed. When automatic indexing is scheduled for the core Search index, the fast one-minute interval is too fast for some indexing tasks and causes multiple indexing tasks to collide. The interval has been removed and now the fastest supported interval is 5 minutes.
When using core Search, indexing tasks can overlap and collide.
Fixed. Automatic indexing and indexing run by CRON or manually can cause multiple indexing tasks to run at the same time, collide, and take too much server compute time. Process locks have been added to prevent multiple tasks from running.
When using core Search, index not updated with add, delete, and update of comments.
Fixed. Hooks to catch comment changes had not been implemented, so comment changes did not trigger search re-indexing. This only applies when using the core Search module. The Search API module has its own mechanism to trigger re-indexing on comment changes.

8.x-1.5.0, 9/14/2020

Requires PHP 7.2+ and Drupal 8.7+

Module update required. Run the update using the administrator's web UI or "drush updb". The update installs an updated view and date formatter and flushes all caches. The flush loads updated routes, libraries, and file names. The module will not function properly until the update is done.

User interface

New features:

Folder browser no longer uses paging.
Paging has been disabled in the folder browser. This caused user confusion because equivalent folder browser functionality in macOS, Windows, and Linux does not page. The browser now always shows all files and folders in the current folder. For sites with extremely large folders, paging can be re-enabled by editing the module's "FolderShare Lists" view using the View UI module.
Sidebar added to folder browser.
A left sidebar has been added to the browser. The sidebar includes links to favorite destinations, including the user's home and shared folders, and the site's public folder, if any.
Sidebar show/hide button added to folder browser toolbar.
A new button on the browser's toolbar shows/hides the sidebar. Sidebar visibility is saved in a cookie so that it is retained across pages and visits to the site.
"Personal files" list split into private and shared file lists.
Content owned by the user is shown in the private list, while content shared with them is in the "Shared" list. Previously these were combined as the user's "Personal files".

Removed features:

Site "Tools" menu links for the module have been simplified.
Previously, three links were automatically added for "Personal files", "Public files", and "All files" (admin only). These have been reduced to a generic "Files & Folders" link to the current user's home folder.

Responsive changes:

Folder browser scrolls horizontally.
When the screen/window is narrow (e.g. on phones), the folder browser's columns scroll horizontally. Previously all columns except for the "Name" column were hidden on narrow screens/windows.
Folder browser user interface grows on narrow screens.
When the screen/window is narrow (e.g. on phones), the toolbar buttons, search box, menu item heights, and browser row heights all increase so that they are more easily touched with a finger.
Sidebar and show/hide button automatically hidden on narrow screens.
When the screen/window is narrow (e.g. on phones), the sidebar and its toolbar show/hide button are automatically hidden.

Other changes:

Styling updated.
Folder browser styling has been adjusted to lighten grays, reduce gradients, and add a little padding. Drag-and-drop target highlighting is clearer.
Terminology updated.
Some terms used throughout the user interface and administrator help pages have been updated:
  • "Edit Description" menu command shortened to "Edit".
  • "Folder list" and "Folder table" changed to "Folder browser".
  • "Personal files" renamed to use the user's display name. The folder is referred to as the user's "home folder".
  • "Public files" shortend to "Public".
  • "All files" shortened to "All".
  • "Lists" in ancestor menu changed to "Favorites".
Icons updated.
Icons for folders and the home, shared, public and all folders favorites have been updated. The new icons are monochrome and do not use shading.
Some motion added to the UI.
Reflecting modern UI style, some quick animations are now used in the user interface. The sidebar slides open/closed, menus slide down, and dialogs slide open.
Folder browser scrolls vertically if configured by the site admin.
By default, the browser uses as much vertical page space as required to list all content. The site admin can reduce the browser to a fixed size. This automatically enables vertical scrolling within the browser.
Folder browser Owner and Size column order reversed.
The Size column is now shown before the Owner column.

Bugs fixed:

Search by users without admin privileges fails.
Fixed. An error in access control checks caused search queries to abort without returning results
File view pages include unnecessary content and running scripts.
Removed. Pages showing a file, rather than a folder, still included some folder browser content and code. This was not necessary and caused the pages to be larger and to run scripted tasks that were not needed.
Administrator features

Primary changes:

Folder browser view revised.
The "FolderShare Lists" view used by the folder browser has been updated and is installed automatically on a module update:
  • Common settings across view displays are now the view's default instead of using identical overrides for each display.
  • New displays have been added to show shared content for the user on a page or within a dialog.
  • Personal view display updated to show only content owned by the user, and not content shared with them.
  • Administrator titles for view displays have been updates to use the same updated Home/Shared/Public/All terminology used in the sidebar and favorites lists.
  • Paging disabled on all view displays now that the browser scrolls vertically when needed.
  • All table columns are now "high" priority, which disables table responsiveness now that the browser scrolls horizontally when needed.
  • The size column has been moved to before the owner column.
Custom date format revised.
The "FolderShare date & time" date format used by the folder browser for the modification date column has been revised and is installed automatically on a module update. The format has been shortened from "Jan 1, 2020 at 12:00 AM" to 1/1/20 12:00 AM". The shorter format allows the modification date column to be narrower and easier to fit onto smaller screens/windows.
Library names and content revised.
The module's CSS/JS libraries have been updated and are picked up automatically on a module update or full cache flush:
  • "foldershare.module" renamed as "foldershare.general".
  • Dialog Javascripts moved from "foldershare.general" into their own libraries: "foldershare.changeownerdialog", "foldershare.folderselectiondialog", "foldershare.renamedialog", and "foldershare.shareddialog.".
  • "core/drupal.tableresponsive" removed from "foldershare.general" since responsive table features are no longer used.
  • "/core/assets/vendor/jquery.ui/ui/form-reset-mixin-min.js" removed since the feature is not used.
  • "/core/assets/vendor/jquery.ui/ui/escape-selector-min.js" removed since the feature is not used.

Other changes:

Root list page routes now use title callbacks.
Root lists, such as the user's home folder, previously used hard-coded title strings. These have been replaced with title callbacks that return translated text. The user's home folder title callback returns the user's display name as the folder name. These same titles are used whenever the route is used, such as in the site's Tools menu, page titles, breadcrumbs, and the folder browser sidebar.
Some source file names have changed.
To better reflect current terminology, a few source file names have changed.
Some CSS class names have changed.
To better reflect current terminology, some CSS class names have changed. Names that included "folder-table" are now "folder-browser".
Menu command plugin weights are now all zero.
Each menu command plugin has a weight to affect the ordering of commands in menus. Previously these weights were not consistent, which made it hard for third-party plugins to add commands well. Now all weights for built-in commands are zero, which causes commands to be sorted alphabetically within menu groups. The only visual effect is that "Download" now comes before "Upload" in the folder browser menu.

Bugs fixed:

MIME type checking for menu commands fails.
Fixed. For menu commands that have MIME type constraints, the constraints were not checked properly and allowed most entities to pass through. Since none of the module's built-in menu commands use MIME type constraints, this only affects third-party menu command plugins.
Restoring configurations from module admin page crashes in Drupal 9.
Fixed. A class constructor for reading configuration files changed in Drupal 9 and required additional arguments.
"url" token crashes on FolderShare entities.
Fixed. Using the token got the entity's URL, but failed to convert it to a string properly for use as a token value.
Developer API

New features:

Hooks added to dynamically enable/disable sidebar.
Two new hooks are available for modules to enable/disable the folder browser's sidebar and the sidebar show/hide button: hook_foldershare_ui_sidebar_enable(), hook_foldershare_ui_sidebar_button_enable(). See "foldershare.api.php".
Hook added to add links to the sidebar.
A new hook adds links below the "Favorites" links in the folder browser sidebar: hook_foldershare_ui_sidebar_links(). See "foldershare.api.php."

Removed features:

LIBRARY_* constants removed.
The internal names for module libraries have been removed from the Constants class. This reflects changes in the module's libraries.

8.x-1.4.0, 7/21/2020

Requires PHP 7.2+ and Drupal 8.7+

Administrator features

Bugs fixed:

FolderShare will not install if the Comment module is not enabled.
Fixed. The Comment module was not intended to be required. YML files for comment fields on FolderShare entities have been updated to indicate that comment fields are only added when the Comment module is enabled. When not enabled, these YML files are skipped and the install proceeds properly.
Usage table display is slow on a site with many users.
Improved. Since the table has one row per user, it will always be larger and slower to generate as the number of users increases. Optimizations have been done to handle common cases faster.

New features:

Drupal 9 compatibility.
The module is now marked as compatible with Drupal 9. It passes all tests by Drupal Rector and Upgrade Status.
User name auto-complete should warn users of privacy issues when displaying email addresses.
Email addresses are considered private personal information in some localities (such as Europe with the GDPR, and California with CCPA). A message to this effect has been added when enabling the display of email addresses (masked or not) with user name auto-complete.
MIME type token added.
The token "[foldershare:mime]" shows the entity's MIME type.
Synonym tokens added.
Token synonyms have been added. "[foldershare:name" is the same as "[foldershare:title]". "[foldershare:author", "[foldershare:user]", and "[foldershare:uid]" are the same as "[foldershare:owner]". "[foldershare:body]" is the same as "[foldershare:description]".
User interface

Bugs fixed:

Extra blank space added by some themes between the folder list toolbar and list.
Fixed. CSS controlling the margins between these two items has been updated to force the margin to zero, despite some themes adding unnecessary spacing.
File and folder icons not centered beside names in folder list.
Fixed. CSS controlling icon placement has been updated to center them vertically.
Drag-and-drop upload of a folder should be rejected, but on Firefox it is not.
Fixed. Browsers differ in how they report a folder drop. The module's folder detection code has been updated to handle Firefox properly. Safari, Chrome, and others remain supported.
Large file and folder sizes are cropped by the size column on folder lists.
Fixed. The column width has been increased.
Developer API

Removed features:

Removed deprecated FolderShare::addInputFile(); use addFileFromInputStream().
Removed deprecated FolderShare::addInputFileToRoot(); use addFileToRootFromInputStream().
Removed deprecated FolderShare::addUploadFiles(); use addFilesFromFormUpload().
Removed deprecated FolderShare::adduploadFilesToRoot(); use addFilesToRootFromFormUpload().
Removed deprecated FolderShare::getExtension(); use getfilenameExtension().
Removed deprecated Settings::get/setAllowedNameExtensions(); use get/setAllowedFilenameExtensions().
Removed deprecated Settings::get/setFileRestrictExtensions(); use get/setFilenameRestrictExtensions().
Methods deprecated in 1.3 have been removed in this release. These are primarily internal methods and are unlikely to be in use by other modules.

8.x-1.3.3, 7/1/2020

Requires PHP 7.2+ and Drupal 8.7+

Developer API

New features:

File utility methods are private, but are needed by other modules that need to work with module-managed files.
The duplicateFileEntity() method on the FolderShare entity class is now public.

8.x-1.3.2, 5/28/2020

Requires PHP 7.2+ and Drupal 8.7+

Developer API

New features:

Breadcrumbs cannot be overridden or extended to support edit or view pages added by other modules.
Key breadcrumb builder methods in the module's FolderShareBreadcrumbBuilder class are now protected instead of private. This enables other modules to subclass and extend breadcrumbs for additional pages.

8.x-1.3.1, 3/20/2020

Requires PHP 7.2+ and Drupal 8.7+

User interface

Bugs fixed:

Some menu command errors from dialogs could leave the modal dialog showing and fail to show the error message.
Error checking has been updates to catch more error states, close any dialog showing, and present user-readable error messages.

8.x-1.3, 2/20/2020

Requires PHP 7.2+ and Drupal 8.7+

Important changes:

Administrator module install, update, and uninstall

New features:

On module install, the module checks that PHP ZIP support is installed.
The module uses ZIP to compress/uncompress content on demand, and to ZIP content when multiple items are downloaded at once.
On module update, the FolderShare entity schema is updated to support case sensitive names.
File and folder names are case sensitive, but an error in the schema made all SQL queries case insensitive. To fix this, on a module update the entity table's schema is adjusted. This should not affect any existing content but, as always, backup your database prior to a module update.
On module update, the administrator's usage table schema is updated to support 64-bit integers.
The usage table records the number of files, folders, and bytes used per user. For large sites, or sites with large files, the original 32-bit integer fields overflowed and caused database error messages. To fix this, on a module update the table is dropped and rebuilt with 64-bit integers. The next usage table rebuild will fill the table with uptodate information using larger integers.
Administrator Drush commands

New features:

Drush commands now support the Drush 10+ format.
The module's administrator Drush commands have been rewritten to support the Drush 10+ format. All commands have new names and many have updated arguments. Use "drush list --filter=foldershare" to list all FolderShare commands.
Drush command " drush fodershare:tasks --finish" added to finish all pending background tasks.
The command drains the background task queue by executing all non-repeating tasks to completion. This is useful before content import/export or database backups to insure that all pending deletes, moves, copies, etc., are completed first.

Removed features:

Drush 8 format commands removed.
The old Drush 8 and its command format do not support the Drupal 8.7+ required by FolderShare. The old commands have therefore been removed and replaced with Drush 10+ format commands.
Drush "foldershare" command removed.
The old command was used to list all commands for the module, but it is no longer needed. Instead use "drush list --filter=foldershare" to list FolderShare's Drush commands.
Drush "foldershare-admin" command removed.
This old command included several administrative functions to delete all content owned by a user, change ownership of all content owned by a user, and unshare everything for a user. However, these commands were only needed during debugging and are normally executed via the user interface when deleting an account. The old "deleteall" command remains is now available as "drush foldershare:deleteall".
Drush "foldershare-benchmark" command removed.
The old benchmarking command was useful for code testing, but it is not a feature needed by administrators and has therefore been removed.
Drush "foldershare-config" command removed.
The old command displayed some module configuration information but its features are available elsewhere.
Drush "foldershare-disabled" command removed.
The old command marked files and folders as disabled, using an internal feature normally only used by long copy, move, and change owner operations. The feature was used for code testing, but it is not a feature needed by administrators and has therefore been removed.
Drush "foldershare-hidden" command removed.
The old command marked files and folders as hidden, using an internal feature normally only used by delete operations. The feature was used for code testing, but it is not a feature needed by administrators and has therefore been removed.
Drush "foldershare-lock" command simplified.
The "--lock" and "--unlock" options have been removed. Using these can cause deadlocks and create odd user-visible "in use" errors. The "--unlockall" option remains, though it should be used with caution.
Drush "foldershare-tasks" command replaced with "foldershare:tasks".
The command name and options have changed to support the Drush 10+ command format.
Drush "foldershare-usage" command removed.
The old command showed the same information already available on the user interface's usage report web page.
Administrator features

Bugs fixed:

Background task execution is disabled in maintenance mode, but shouldn't be.
A check for maintenance mode has now been removed. Tasks will now continue to execute on page termination and CRON, even while a site is in maintenance mode. This insures that activity initiated by a site administrator in maintenance mode doesn't stall until the site leaves maintenance mode.
Saving the module configuration crashes if the Search module is not installed.
See Issue 3069873. A check for installation of the Search module was missing and has been fixed. The Search module is not required by FolderShare.
Search index updates add a log entry, even when activity logging has been disabled.
Search index updates now add a log entry only if the module's activity logging is enabled.
Usage table updates add a log entry, even when activity logging has been disabled.
Usage table updates now add a log entry only if the module's activity logging is enabled.

New features:

File upload size limit setting added.
A maximum file size for uploaded files may be set. This defaults to and has a maximum value equal to the maximum file size or post message size set in PHP's .ini file for the host. When a user selects a file to upload, its size is checked and the upload blocked if a file is too large.
Developer API

Bugs fixed:

FolderShare::addAccessGrant() and deleteAccessGrant() methods allow enabling a shared item to grant author access, but not view access.
Since an author must be able to view content as well, enabling author access now automatically enables view access as well.
FolderShare::addFile*() methods return NULL instead of throwing exceptions on invalid inputs.
These methods now throw exceptions like other API methods.
FolderShare::deleteAll() method doesn't always delete all.
The old method skipped deleting hidden items, which are already scheduled for deletion. The method now deletes them anyway.
FolderShare::createFolder() does not validate that the parent is a folder.
The parent is now validated and an exception thrown if it is not a folder.
FolderShare::fsck() fixes hidden items by making them visible, but shouldn't.
Items marked hidden are in the process of being deleted. When fsck() finds these, but there is no pending delete task, then the delete must have failed. Instead of making these items visible again, which can cause user confusion and name collisions, fsck() now tries to delete them again as the user originally intended.
FolderShare::getDescription() method returns a raw field array instead of the description text.
The method now returns the description only, not the entire field array. A new getDescriptionFormat() method returns the field's text format.
FolderShare::getSize() method returns a string instead of an integer.
The size is now cast to an integer before it is returned.
FolderShare::setDescription() method sets the description AND resets the field's text format
setDescription() now only sets the description. A new API method setDescriptionFormat() sets the text format.
FolderShare::setChangedTime() method sometimes doesn't set the changed time.
Setting the changed time field now works and bypasses Drupal core's tendancy to set this field automatically when any part of the entity has changed, including the changed time field itself.
FolderShare::set*() methods that set fields should return $this.
To be consistent with most other set*() methods, and support method call chaining, all field set*() methods now return $this.
FolderShare::setKind() method does not validate incoming kind types.
Arguments are now validated and an exception thrown for bad values.
Folder paths that end in "/" should be accepted if the last item on the path is a folder.
Like Linux/BSD/macOS, when a folder path is parsed, it is now legal to include an extra "/" on the end if the last item in the path is a folder. If it is not a folder, the extra "/" is a path error.
Functions deprecated in Drupal 8.8 should not be used.
When installed for Drupal 8.8+, the module does not call deprecated functions. It uses replacement methods instead. However, when installed in Drupal 8.7, which does not support some of the new replacement methods, the module continues to call deprecated functions. This insures compatibility with Drupal 8.7 and Drupal 8.8+.

New features:

FolderShare::addAccessGrant(), deleteAccessGrant(), and setAccessGrant() update access grants.
These methods were previously private. Use these methods to programmatically adjust a file/folder's sharing for viewing and authorship.
FolderShare::addFileFromLocalFile() and addFileToRootFromLocalFile() add local files.
These new methods copy or move a local file into the managed file system and add it to a folder or top-level (root) list.
FolderShare::add*File*() and create*Folder() methods include a new owner ID argument.
When actions are being taken on behalf of another user (such as importing content from somewhere), the add*() and create*() methods now support an optional new owner ID argument that defaults to the current user.
FolderShare::getDescriptionFormat() method returns the description text format.
The text format used by the description is returned.
FolderShare::getDefaultFolderName() and getDefaultObjectName() return the initial (default) name for new folders and objects.
These new methods return the default name name used for new folders and objects. The default cannot be changed.
FolderShare::setDescriptionFormat() method sets the description text format.
The text format used by the description is now settable.
FolderShare::setMimeType() sets an item's MIME type.
The method was previously private.
FolderShare::updateSizeAndAncestors() updates recorded ancestor sizes when a descendant changes.
The method was previously private.
FolderShareScheduledTask::finishTasks() runs pending tasks to completion.
This method runs and runs, repeatedly, the tasks in the task queue until all non-repeating tasks finish. This can be used to drain the queue prior to performing an administrative action, like import, export, or a database backup.
Menu command annotation supports marking a command as the default for copy, move, and upload.
The browser-based user interface supports drag-and-drop to copy and move selected files within a FolderShare list, and upload files dragged from the OS desktop. For copy, move, and upload, the menu command annotated as handling these operations is invoked. This new annotation enables developers to create new versions of these commands that override the defaults.
Menu command annotation supports MIME type-based enable.
Menu command annotation indicates the conditions under which a command is available, such as whether it is a file or folder or owned by the current user. A new MIME type based constraint enables menu commands to be enabled only for selected items of a particular MIME type. For instance, a menu command can be set up to only apply to image files.
Menu command annotation supports filename extension-bsaed enable.
Filename extension-based menu command constraints were already available for controlling command use based upon a selection. This has been extended to provide similar parent folder and destination folder constraints based on their filename extensions.

Removed features:

FolderShare::addFile(), addFiles(), addFileToRoot(), and addFilesToRoot() are now private.
These internal methods and should not be called directly. Instead, call public methods that handle specific cases and associated error checking, such as addFileFromInputStream(), addFilesFromFormUpload(), and addFileFromLocalFile().
FolderShareSearch::getSearchFileExtensions() renamed to getSearchFilenameExtensions().
"File" in the method name has been changed to "Filename" for improved clarity and consistency. Old method names not supported because FolderShareSearch is primarily an internal class.
ManageFilenameExtensions::get*Extensions() renamed to get*FilenameExtensions().
"Filename" has been inserted into the method names for improved clarity and consistency. Old method names not supported because ManageFilenameExtensions is primarily an internal class.
ManageFilenameExtensions::getExtension*() renamed to getFilenameExtension*().
"Filename" has been inserted into the method names for improved clarity and consistency. Old method names not supported because ManageFilenameExtensions is primarily an internal class.
ManageFilenameExtensions::get/setAllowedNameExtensions() renamed to get/setAllowedFilenameExtensions().
"Name" in the method name has been replaced with "Filename" for improved clarity and consistency. Old method names not supported because ManageFilenameExtensions is primarily an internal class.
ManageSearch::getIndexFileContentExtensions() renamed to getIndexFileContentFilenameExtensions().
"Filename" has been inserted into the method name for improved clarity and consistency. Old method names not supported because ManageFilenameExtensions is primarily an internal class.
Settings::get/setFileRestrictExtensions*() renamed to get/setFileRestrictFilenameExtensions*().
"Filename" has been inserted into the method names for improved clarity and consistency. Old method names not supported because Settings is primarily an internal class.
FolderShare::validateNameAndExtension() renamed to validateNameAndFilenameExtension().
"Filename" has been inserted into the method name for improved clarity and consistency. The oldld method name is not supported because the method is primarily internal.
"fileExtensions" command annotation renamed to "filenameextensions".
The annotation name has changed for improved clarity and consistency.

Deprecated features:

FolderShare::addInputFile() deprecated; use addFileFromInputStream().
FolderShare::addInputFileToRoot() deprecated; use addFileToRootFromInputStream().
FolderShare::addUploadFiles() deprecated; use addFilesFromFormUpload().
FolderShare::adduploadFilesToRoot() deprecated; use addFilesToRootFromFormUpload().
FolderShare::getExtension() deprecated; use getfilenameExtension().
Settings::get/setAllowedNameExtensions() deprecated; use get/setAllowedFilenameExtensions().
Settings::get/setFileRestrictExtensions() deprecated; use get/setFilenameRestrictExtensions().
Methods renamed for improved clarity and consistency.
Developer hooks

New features:

hook_foldershare_allowed_filename_extensions_alter() added.
This hook is called when setting up an upload form in order to set a list of allowed filename extensions for the upload. The hook is also called after a file upload, copy, move, rename, or extract from a ZIP file to verify that a file's extension is allowed in the current parent folder and by the current user. This hook may be used to set up the allowed filename extensions per folder and/or per user.
hook_foldershare_file_upload_size_liit_alter() added.
This hook is called when setting up an upload form to set the maximum file size allowed. The hook is also called after a file upload to verify that a file's size is allowed in the current parent folder and by the current user. This hook may be used to set up the allowed upload size limits per folder and/or per user.
hook_foldershare_mime_type_alter() added.
This hook is called each time a file's MIME type is set. The hook may return an alternate MIME type. This may be used to provide more detailed MIME types than are available via Drupal's built-in MIME type guesser. This also can provide different MIME types for different types/names/locations of folders.
hook_foldershare_validate_file() added.
This hook is called with each added file, before it is added to a folder. Hook implementations may validate the file by checking its name, extension, or contents and throw exceptions if it is not valid.
hook_foldershare_ui_ancestor_menu_enable() added.
This hook is called each time an entity or top-level file/folder list is viewed in the user interface. This hook returns TRUE if the ancestor folder menu should be included in the user interface (the default is TRUE). This may be used to selectively enable/disable the menu per file or folder and/or per user.
hook_foldershare_ui_command_enable() added.
This hook is called each time a culled list of menu command plugins is created for a page showing an entity or top-level file/folder list in the user interface. This method can hide unwanted plugins for a specific file/folder and/or user.
hook_foldershare_ui_command_menu_enable() added.
This hook is called each time an entity or top-level file/folder list is viewed in the user interface. This hook returns TRUE if the main menu should be included in the user interface (the default is TRUE). This may be used to selectively enable/disable the menu per file or folder and/or per user.
hook_foldershare_ui_search_box_enable() added.
This hook is called each time an entity or top-level file/folder list is viewed in the user interface. This hook returns TRUE if the search box should be included in the user interface (if the Search module is enabled). This may be used to selectively enable/disable the search box per file or folder and/or per user.
User interface

Bugs fixed:

Administrator usage table styling is odd for some themes.
Extaraneous div's have been removed that caused odd styling with some themes.
Anchors for files and folders in a folder list do not respond to touch events.
Javascript has been corrected that handles the dispatch of clicks and touches on file/folder items, including for item anchors.
Breadcrumbs on view pages sometimes include the current file or folder name at the end, but shouldn't.
The breadcrumbs now reliably do not include the current page's item. Some themes add the current page to the end.
Breadcrumbs on an Edit form do not show the file and folder path.
The full breadcrumb file and folder path is now shown on Edit forms.
Change Owner and Rename dialogs map a carriage return to submitting the dialog, instead of canceling it.
Javascript attached to these forms now maps carriage returns to form submits.
Browser-created auto-fill menus on Change Owner and Share dialog text fields interfere with auto-complete menus.
Browser behavior varies and often ignores the module's standard HTML request to disable auto-fill on these fields. A work-around is now used that works for Chrome, Firefox, and Safari by naming the fields to bypass browser heuristics.
Browser-created auto-fill menu on Rename dialog shows user account suggestions, which is not appropriate.
Browsers use heuristics to guess which rields may be prompting for account names, then present account suggestions. This is not appropriate for a file/folder rename. A work-around is now used that works for Chrome, Firefox, and Safari by naming the field to bypass browser heuristics.
Change Owner and Share dialogs sometimes show error messages within the form instead of at the bottom.
Error message placement has been updated.
Change Owner and Share dialog user name auto-complete crashes when a site uses MySQL.
See Issue 3088580. An SQL database query was used that did not work correctly with MySQL. The query has been adjusted to be database-agnostic.
Compress menu item does not limit selection to files, images, or folders.
The command now limits selected item kinds to files, images, and folders, which excludes un-compressable objects and media items.
Copy and Move dialogs show an odd "Refresh" button on some themes.
The "Referesh" button is now always hidden, along with other internal form inputs, regardless of theme choice.
Copy and Move dialogs allow multi-selection, but shouldn't.
These dialogs now limit selection to a single item at a time.
Copy and Move dialogs don't support clearing the selection by clicking outside of the list.
These dialogs now clear the selection on a click or touch outside of the list.
Copy and Move dialogs do not copy or move to a selected folder.
The currently selected folder, if any, is now used when the dialog is submitted.
Copy, Move, and Share dialogs log an unserialization error, and share dialog fails to add users with PHP 7.3
PHP 7.3 changed object serialization behavior and broke a number of features in Drupal core and contributed modules. In this case, an internal value used by these dialogs could not be unserialized as the user moved up/down among copy/move folders in the copy/move dialog, or added users in the share dialog. Use of the internal value was changed and PHP 7.3 no longer reports an unserialization error.
Delete and Move menu items are sometimes available on selections that are not owned by the user.
The menu item availability checks have been fixed.
Dialog presentation sometimes generates a Javascript error about resizing the dialog.
The message comes from Drupal core's Javascript to "auto-resize" dialogs. It appears to be a bug in core, but a work-around is now used that simply disables auto-resize behavior.
Error message dialog's only button is labeled "Cancel" instead of "Done".
The button is now labeled "Done".
Error message dialog triggered on notice messages instead of just errors and warnings.
The error dialog now only shows errors and warnings.
Error messages are sometimes not displayed.
The way error messages are tracked has changed to avoid a quirk in Drupal core's use of the messenger.
Folder path field shows the wrong top-level list when viewing public items, or for the admin when showing non-admin items.
The folder path field (disabled by default) now shows the correct top-level list based on context.
Inline Form Errors module causes redundant error messages in dialogs.
Inlining of form errors is not needed on small forms and dialogs and causes unexpected semi-redundant error messages. The Inline Form Errors module's inlining has been disabled for the Change Owner, Copy, Move, Rename, and Share dialogs.
Move menu command provides sluggish feedback that a move has occurred.
Move operations occur immediately, but a bug in the AJAX response prevented an immediate file/folder list update from showing the user that the move had occurred.
Toolbar button styling is odd for some themes.
The HTML structure, classes, and default styling for the buttons and toolbar above the file/folder list have been adjusted to be theme-friendly.
Toolbar menu button icon is easily confused with a site's menu icon.
The menu button has used a "hamburger" icon (three horizontal bars) that is also commonly used for a main site menu on mobile devices. This can be confusing, so the menu button has been changed to a "gear" icon, reflecting that file/folder activity changes content. A similar icon is used for a similar menu in the macOS Finder.
Upload of multiple files aborts and skips all files if any one file has an error.
Uploaded file handling checks all uploaded files and adds those that have no errors, while issuing error messages about the rest.
Uploaded file errors all report "in use" message instead of the real problem.
Error message handling has been revised to show the correct error message when an uploaded file has a problem.
Uploading files by drag-and-drop sometimes fails to catch the dragged files and then presents a full-page minimalist upload form.
A timing problem with drag-and-drop file uploads has been fixed.

New features:

Dialog text simplified.
Dialog titles and explanatory text have been simplified to be shorter and consistent in format and terminology.
Menu item "New object" added.
An object is an item in a folder that has a name and description, but nothing else.
Tooltips have been added to multiple UI widgets.
Brief explanatory tooltips are now attached to the main menu button, the ancestor button, the search box, entries in the file/folder list, and the administrator's usage table update button.
Updated styling on administrator settings.
The administrator settings page has updated default styling to correct vertical tab layout issues and be compatible with most themes.
Updated styling on administrator usage report.
The administrator usage report page has updated styling to remove most module-specific styling and be compatible with most themes.
Updated styling on file/folder list.
The file/folder list, toolbar, and footer, have updated classes and a better default layout and styling. Styling uses a lighter color scheme, and the folder icon has been changed from blue to gray in order for the UI's colors to be more compatible with theme colors. The row selection color now defaults to the light yellow color defined by Drupal's default selection styling. All colors are now parameterized and use CSS variables set and documented at the top of the CSS file. The list is now compatible with most themes.
Updated styling on search results.
The search results page has updated styling to remove most module-specific styling and be compatible with most themes.
Upload file number is checked before a file upload.
A standard PHP setting selects the maximum number of files per upload. When a user selects multiple files to upload, if the number of files is larger than the maximum allowed, the upload is blocked and a message dialog shown to the user.
Upload file size is checked before a file upload.
An administrator setting (and developer hook) selects a maximum file size for uploads. When a user selects a file to upload, if the file is larger than the maximum allowed, the upload is blocked and a message dialog shown to the user.
Upload filename extension is checked before a file upload.
An administrator setting (and developer hook) selects the set of filename extensions allowed for uploads. If a user uses the upload menu command and file dialog to upload files, the dialog will not show files that do not have allowed filename extensions. If a user uses drag-and-drop from the OS desktop to upload files and a file's extension is not allowed, the upload is blocked and a message dialog shown to the user.
Upload total size of multiple files is checked before a file upload.
A standard PHP setting selects the maximum server request size, such as when uploading one or more files. When a user selects multiple files to upload, if the sum of their sizes is larger than the maximum request size, the upload is blocked and a message dialog shown to the user.

8.x-1.2, 9/17/2019

Requires PHP 7.2+ and Drupal 8.7+

Important changes:

Administrator module install, update, and uninstall

Bugs fixed:

Module pre-uninstall hook misnamed and not called.
The hook has been renamed.
Menu links are defined using an internal URL instead of the "route_name" field.
Menu link definitions now use the "route_name" field. A module update will flush all caches and find the corrected menu links.
Menu link description text is out of date.
The text has been updated. A module update will flush all caches and find the updated text.
Menu link titles may not match route titles.
Menu links have their own "title" fields, but when they refer to a parent route, the titles should match route titles. Drupal core doesn't do this automatically. The "menu_lnks_discovered_alter" hook is now used to keep titles based on routes.
Route titles may not match page titles.
Route titles were set using the "_title" field in the routing file, but page rendering set titles explicitly. These are now coordinated to always use the route titles.
Routes have unused "_description" fields.
The "_description" field is not used for routes. It's text has been removed.
Redundant "report" word from usage report title.
The usage report link and title have changed from "FolderShare usage report" to just "FolderShare usage". A module update will flush all caches and find the updated title.
Site error caused if the Drupal core "search" module is not enabled, even though it should be optional.
UI code that referenced the "plugin.manager.search" service without first checking if the "search" module was installed has been fixed.
Site error could be caused on module uninstall.
The pre-uninstall hook (once properly named) did not delete the module's uploaded files directory correctly. This bug would never have been encountered by sites because the hook was improperly named, and thus never called on an uninstall anyway.

New features:

Include Field UI menu links as submenus on "FolderShare" structure menu.
The "Manage fields", "Manage forms", and "Manage displays" links for the Field UI module's pages about FolderShare entities are now included as submenu items under the "FolderShare" entry in the admin's structure menu. These are only included if the Field UI module is enabled.
Administrator Drush commands

Bugs fixed:

Drush command to list locks does not print lock ID.
A typo in the print function has been fixed to print the lock ID.

Removed features:

Internal Drush command to benchmark logging removed.
Benchmarking logging was useful during code testing, but it is not a feature needed by administrators.
Internal Drush command to benchmark hooks removed.
Benchmarking hook calls was useful during code testing, but it is not a feature needed by administrators.
Administrator features

Bugs fixed:

Activity logging enable/disable choice disabled if Drupal core "dblog" module is not installed.
Since a site does not have to use "dblog", logging settings are now always available, regardless of the install status of "dblog".
Background task scheduler does not check for execution time limits before starting the next task.
The scheduler now checks the current process's execution time before starting a task, and stops if the time is approaching a limit. This avoids unexpected task interrupts and errors due to hitting a time limit.
Log messages generated by background tasks have the wrong user ID.
Updated to use the user ID of the initiator of the task, rather than that of the current user (which may differ if a background task is executed by CRON or another user's page termination).
Multi-file add or upload does not log a list of all files.
Updated to log everything.
Usage data update should post a log message.
Updated to post a log message on each usage data update.
Search indexing should not include the file/folder's sharing status.
Deleted. The sharing status on a file/folder is a feature of its highest ancestor, not the file/folder itself. If that ancestor's sharing is changed, the status changes but there is no cache flush to insure this is updated in the search index. This would be very expensive, so instead the sharing status is removed from a file/folder's index entry.
Search indexing of file content incorrectly checks file name extensions.
Corrected to index file content only if the file name extension is on the allowed list set on the search plugin.
Search indexing does not add file name words to index if file content not indexed.
File name words are now always added, whether or not the file's content is indexed too.
Search indexing does redundant text filtering.
Deleted. The "search" module already does text filtering.
Search indexing should post a log message.
Added.

New features:

Administrator settings page has been reorganized and condensed.
The page's vertical tabs have been reduced to "About", "Files", "Interface", and "Services." Except for "About", the tabs use open-able details groups to organize settings, use less space, and be less overwhelming. Text has been simplified.
User autocomplete settings added to administrator settings page to control visibility of email addresses.
The change owner and share forms now use an autocomplete field to help a user select another user at the site. This autocomplete can show the account name or display name, and optionally a full or masked email address.
Background search indexing scheduling added to administrator settings page.
By default, search indexing is initiated by CRON. When CRON executions are set to multi-hour intervals, the search index can be far out of date. An optional background reindexing task can now be set to update more frequently by using page termination hooks.
Links to the module's various pages added to the administrator settings page.
The "About" tab now includes quick links to other relevant pages for the module, including its help page, permissions, views, search plugin, etc. If the FolderShare REST module is installed, links to its help page and REST plugin are included.
Administrator's usage report columns should sort by name or number.
The usage report now has sort links on table columns so that the list of users can be sorted by user name, number of folders, number of files, or number of bytes used.
Entity log entries include full path to entity.
Logging has been updated to include the full entity path on each posting.
Entity log entry formatting updated for better format consistency.
Log messages have been updated to use a consistent wording style that always shows the entity name and entity ID in parenthesis.

Removed features:

Extra "See also" links removed from administrator settings page.
The links to other modules and pages were obvious and added visual clutter and extra text to the page.
REST plugin settings restore button removed from administrator settings page.
REST support has been moved to the separate and optional FolderShare REST module.
User profile links removed to speed up usage report display.
Creating a link to a user's profile requires loading the User entity for each user in the report. Since the report includes all users at the site, if there are large number of users then there are a large number of User entities to load and report display is slow. Removing the links speeds up the page.
Developer API

Bugs fixed:

File/folder naming allows names that are entirely white-space or that contain carriage returns and other control characters.
Names are no longer allowed if they are entirely white space or include control characters.
Local file name parsing not using multi-byte string functions.
Fixed. All local file name handling is now UTF-8 safe.
Token group and search plugin use "folders and files", but module uses "files and folders."
Reconciled to always use "files and folders" phrase.
Functions deprecated in Drupal 8.7 should not be used.
Fixed.
Developer hooks

Bugs fixed:

User ID of requesting user should be passed to post operation hooks.
Operation hooks may be called from background tasks that are executing on CRON or page termination after presenting a page to an unrelated user. The hooks are now passed the user ID of the user that initiated the operation, which may differ from the current user how triggered the page termination activity.
User interface

Bugs fixed:

Copy and move operations via the GUI failed silently and closed the dialog when double-clicking on a folder, clicking on the folder's link, or selecting a destination folder and clicking on the submit button.
These operations were causing an improper AJAX return that closed the dialog instead of refreshing it or executing the copy or move.
File/folder list column headings not shown as links.
Styling has been corrected since column headings are links (they sort the list).
File/folder list icons cropped at top.
Styling has been corrected.
File/folder toolbar menu buttons and usage report update button should not highlight on hover.
Hover effects on button icons removed. These are not touch relevant and modern UI design rarely favors button hover effects. A theme can still add its own effects.

New features:

Share form should only list relevant users, not all site users.
The form has been redesigned. An "add" prompt selects a user to add to the sharing list for a file/folder. Added users can be granted view or author access. If neither is granted, the user is automatically removed from the share list when the form is saved. The add prompt uses a new autocomplete service to find users by account name, display name, or email address (see below).
Change owner form auto-complete should show display name and email address along with account name.
A new user autocomplete service now handles this form. It uses the entered text to search for similar account names and, optionally, display names and email addresses. Display name searching is only available if the "realname" module is installed. Email addresses, or masked addresses, are shown based upon settings in the module's administrator settings page.
Form validation errors should be shown within the same dialog.
Validation errors for the Share form, Rename form, and Change owner form are now shown as messages at the bottom of the dialog instead of in a separate message dialog after the form dialog is closed.

8.x-1.1, 3/30/2019

Requires PHP 7.2+ and Drupal 8.6+

Miscellaneous

Bugs fixed:

Deleting an account causes a site error.
On an account delete, the module automatically deletes the account's files and folders or reassigns ownership to another account. A typo caused these operations to fail.

New features:

Drush commands added to test account administration responses.
The "foldershare-admin" command supports options to delete all content, delete all content owned by a user, change ownership of all content owned by a user, and unshare a user from all content. These are the same operations performed automatically on account deletion, depending upon the site administrator's content handling preferences.

8.x-1.0, 3/28/2019

Initial release.

Requires PHP 7.2+ and Drupal 8.6+