8.x-1.2, 9/17/2019
Requires PHP 7.2+ and Drupal 8.7+
Important changes:
- REST web services have been moved to the optional "FolderShare REST"
module. Once installed, services work as in prior versions of this
module.
- Sharing form has been rewritten to prompt for users instead of listing all
site users.
- Administrator settings page has been reorganized and condensed.
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.