FolderShare Release Notes
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:
- Database schema updates are done on module update. As always, backup your database prior to a module update.
- User interface classes and styling have been updated to be more theme-friendly.
- Administrator Drush commands have been rewritten for Drush 10+. Command names and some features have changed.
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:
- 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.
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+