Root File Manager folder not using default storage location

Hello,

I’ve created a custom package for IONOS S3 Object Storage that works correctly. However, I’m experiencing an issue with the File Manager root folder not respecting the default storage location setting.

Current Setup:

  • Concrete CMS 9.4.6

  • Custom storage location package for IONOS S3 (based on Flysystem v1)

  • IONOS S3 is set as the default storage location in Dashboard > Files > File Storage

    Locations

  • The S3 connection and configuration work perfectly (tested independently)

    What Works:

  • When I create a NEW folder in File Manager and set its storage location to “IONOS S3”, all files uploaded to that folder are correctly stored on S3

  • The S3 adapter, filesystem, and file operations work correctly

  • Files in S3 are accessible and thumbnails display properly

The Problem:

  • When uploading files to the root folder of the File Manager (not in any

    subfolder), files are still being uploaded to the “Local” storage location instead of

    the default IONOS S3 location

  • The root folder seems to have its own storage location override set to “Local”

How can I force the File Manager root folder to use the default storage location (IONOS S3) instead of Local? Is there a configuration setting, database field, or FileSet property that controls the storage location for the root folder specifically?

Any guidance would be greatly appreciated!

There is a database table named FileStorageLocations, take a look in there.

Hi,

However, it seems good in database table FileStorageLocations.

You’re really close. First, yes, there is a per-folder configuration of a file storage location. So just because you add a new storage location doesn’t mean it will automatically apply to all folders. If any folder has been set up to have a custom file storage location or has been saved at all in the past (thereby probably setting the default storage location to that folder) it will probably have to be re-saved with the new file storage location as its default.

However, by making sure you set the default file storage location in the file storage location Dashboard page, that should be all you have to do to make this storage the location the default for any folders that haven’t been specifically overridden. In my local 9.4 install this was all file folders – by default no storage location are attached to folders. However, there may be custom code or previous versions or something that have managed to set the originally default file storage location as the preferred storage location for the root folder node of the file manager. If that’s the case, then it might be that any folders you’ve set your new S3 location to are working fine, but the root folder is not. If that’s the case, you’ll have to go into the database to make this change.

First, find the root file folder node ID. This is not a folder you can actually browse to in the file manager. However, it’s pretty easy to get the node. First, get all the tree node types:

mysql> select * from TreeNodeTypes;
+----------------+----------------------------+-------+
| treeNodeTypeID | treeNodeTypeHandle         | pkgID |
+----------------+----------------------------+-------+
|              1 | group                      |     0 |
|              2 | group_folder               |     0 |
|              3 | category                   |     0 |
|              4 | express_entry_category     |     0 |
|              5 | express_entry_results      |     0 |
|              6 | express_entry_site_results |     0 |
|              7 | topic                      |     0 |
|              8 | file                       |     0 |
|              9 | file_folder                |     0 |
|             10 | search_preset              |     0 |
+----------------+----------------------------+-------+

Find the file_folder node type. Here it has an ID of 9. Then, find the node in the TreeNodes table that has this node type ID and a parent ID of 0. That will be the root file folder node.

select treeNodeID from TreeNodes where treeNodeTypeID = 9 and treeNodeParentID = 0;
+------------+
| treeNodeID |
+------------+
|          7 |
+------------+
1 row in set (0.00 sec)

Now, you’ll want to see if there are any custom storage locations set to this value.

select * from TreeFileFolderNodes where treeNodeID = 7;
Empty set (0.00 sec)

In my install there are none, which means that when I upload a file it will automatically use whatever storage location is set as default. I’d honestly be surprised if yours was set any differently, but the behavior you’re describing is as though there is a value set. For you, you’ll probably see something similar to what I see when I look for all the values in this table:

mysql> select * from TreeFileFolderNodes;
+------------+-------+
| treeNodeID | fslID |
+------------+-------+
|         10 |     2 |
+------------+-------+

This is saying that for my treeNodeID of 10, I have my file storage location of 2 set. You’ll want to update this fslID value to your preferred storage location for all the values of the TreeFileFolderNodes table.

And do definitely verify that you’ve actually set the default storage location properly in the Dashboard - the behavior you’re describing doesn’t sound very typical.

Hi Andrew,

Thank you very much for taking the time to write such a detailed and clear explanation — it really helped.

You were absolutely right: the issue was related to a storage location being implicitly set at the folder/root level. After double-checking the default file storage location in the Dashboard and inspecting the TreeFileFolderNodes table, I found that an old fslID was indeed set and overriding the default behavior.

Once I updated the fslID to point to the new storage location (and verified the root file folder node), everything started working as expected. New uploads now correctly use the intended default storage location.

Thanks again for your help and for sharing such a thorough troubleshooting approach.