Hi!
I tried to add a Group field to the directory listing and enable it as a permitted content type for groups. But when I try to create it as a group content I get the following error:

Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'folder_path' cannot be null: UPDATE {filebrowser_nodes} SET nid=:db_update_placeholder_0, folder_path=:db_update_placeholder_1, properties=:db_update_placeholder_2 WHERE nid = :db_condition_placeholder_0; Array ( [:db_update_placeholder_0] => 2683 [:db_update_placeholder_1] => [:db_update_placeholder_2] => O:30:"Drupal\filebrowser\Filebrowser":26:{s:3:"nid";s:4:"2683";s:10:"folderPath";N;s:10:"fileSystem";N;s:14:"exploreSubdirs";N;s:15:"downloadArchive";N;s:13:"createFolders";N;s:15:"downloadManager";N;s:13:"forceDownload";N;s:14:"forbiddenFiles";N;s:9:"whitelist";N;s:7:"enabled";N;s:14:"allowOverwrite";N;s:8:"accepted";N;s:11:"defaultView";N;s:8:"encoding";N;s:13:"hideExtension";N;s:14:"visibleColumns";N;s:11:"defaultSort";N;s:16:"defaultSortOrder";N;s:13:"gridAlignment";N;s:11:"gridColumns";N;s:14:"gridImageStyle";N;s:13:"gridAutoWidth";N;s:10:"gridHeight";N;s:9:"gridWidth";N;s:13:"gridHideTitle";N;} [:db_condition_placeholder_0] => 2683 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 783 of /var/www/html/opensocial/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Any ideas why this could be the case? Creating the GroupContent seems to be unsuccessful...
Thanks!

Comments

newbie_01 created an issue. See original summary.

clivesj’s picture

First: can you confirm the version?
Acc. The issue you are using beta4.
If so plse upgrade to th latest version and let me know

newbie_01’s picture

Version: 8.x-2.0-beta4 » 8.x-2.0
newbie_01’s picture

I was actually using 8.x-2.0 just checked the composer.lock

clivesj’s picture

The error means that you didn't enter a Folder Path on the node create form.
This should be captured the moment you submit the node.
But it is not happening here. Also I cannot imagine that yuo didn't enter a folder path.

Can you send me a screen copy of your node edit page?
You can also send it via PM if you want to.

clivesj’s picture

Can you also tell me which group modules you have installed so I try to replicate your setup on my dev.

newbie_01’s picture

StatusFileSize
new54.68 KB
new47.62 KB
new35.06 KB
new39.1 KB
new63.2 KB

As you thought, I do define a folder path the only field I added is the group field.
Furthermore Content enabled shows how I enabled the contant type for the group.

The module for the group is Group but I am using it within the distribuition OpenSocial so there is an additional SocialGroup module provided by them (it mainly does front end stuff though).

clivesj’s picture

Thanks, let me chew on this

clivesj’s picture

Hello,
I can not replicate your error.
These are my steps:

1. Enabled group and group node module
2. Created a group type Countries and a group Africa
3. Set the permissions inside groups module
4. Set Directory Listing as a allowable node type
5. Added a field “group” to the node type dir listing
6. Created a new dirlisting node.

This went without errors.

Please list your steps so I can check where things are going wrong in your case.
B.t.w.
Why do you want to add a group field to the node?
If you create the node from the the scope of group Africa, it will be automatically associated to group:Africa.
But I am new to Groups so Maybe there is a good reason to manually add the group field to the node

newbie_01’s picture

My steps are:

1. Enabled group and group node module
2. Created a group Africa of Social group type 'Closed Group'
3. Set the permissions inside groups module
4. Set Directory Listing as a allowable node type
5. Added a field “group” to the content type dir listing
6. Created a new dirlisting node with reference to the group.

I'm not sure what you mean by within the scope. When I attempted to create a node "within" a group using simplytest.me there was no visible link/referencing between a node and the group.
Ok so I've looked at it in a blank drupal install and you are right, it works. So the problem must be caused somehow by the opensocial distribution. Would you mind having a look at it despite that?

clivesj’s picture

OK, I also have an OpenSocial site on my dev environment.
I will try it and let you know tomorrow.
I am not an expert on the group module.
There is a block especially for group actions.
In that block there will be a link: “create dir listing node”
When you create that node it will be automatically associated with the group you are in.
You don’t have to create a group field in order to associate the node with the group.
(But I think we are off-topic now)

clivesj’s picture

Status: Active » Closed (works as designed)

I am closing this one because it looks like it is caused by Open Social.
i will follow the issue posted there: https://www.drupal.org/project/social/issues/3032408