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!
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | content.png | 63.2 KB | newbie_01 |
| #7 | 2019-02-11_16-59-35.png | 39.1 KB | newbie_01 |
| #7 | 2019-02-11_16-59-18.png | 35.06 KB | newbie_01 |
| #7 | 2019-02-11_16-59-11.png | 47.62 KB | newbie_01 |
| #7 | 2019-02-11_16-58-57.png | 54.68 KB | newbie_01 |
Comments
Comment #2
clivesj commentedFirst: can you confirm the version?
Acc. The issue you are using beta4.
If so plse upgrade to th latest version and let me know
Comment #3
newbie_01 commentedComment #4
newbie_01 commentedI was actually using 8.x-2.0 just checked the composer.lock
Comment #5
clivesj commentedThe 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.
Comment #6
clivesj commentedCan you also tell me which group modules you have installed so I try to replicate your setup on my dev.
Comment #7
newbie_01 commentedAs you thought, I do define a folder path the only field I added is the group field.
shows how I enabled the contant type for the group.
Furthermore
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).
Comment #8
clivesj commentedThanks, let me chew on this
Comment #9
clivesj commentedHello,
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
Comment #10
newbie_01 commentedMy 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?
Comment #11
clivesj commentedOK, 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)
Comment #12
clivesj commentedI 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