Which Forms version are you running?
1.1.0
Nextcloud or ownCloud?:
Nextcloud
Nextcloud/ownCloud version:
17.0.1
Upon clicking "Done," message appears: "Error on saving form, see console."
Form does not save.
Form should be added, saved successfully.
In case of a bug, please answer the following questions
Where did you install Nextcloud from:
https://github.com/nextcloud/vm/blob/master/nextcloud_install_production.sh
Operating system:
Ubuntu 18.04 LTS
Web server:
Default (Apache 2.4.29)
Database:
Default (PostgreSQL 10.10)
PHP version:
Default (PHP 7.2.24)
Signing status:
Don't known what that means.
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
No errors have been found.
List of activated apps:
AppOrder
0.8.0
Bookmarks
2.3.1
Calendar
1.7.1
Official
Camera RAW Previews
0.7.2
Extract
1.2.2
Full text search - Files - Tesseract OCR
1.3.1
Group folders
5.0.4
Official
Mail
0.20.0
Official
Notes
3.0.3
Official
ONLYOFFICE
3.0.2
Official
Suspicious Login
3.0.0
Accessibility
1.3.0
Official
Activities for shared file downloads
1.6.0
Activity
2.10.1
Official
Announcement center
3.6.1
Official
Auditing / Logging
1.7.0
Official
Collaborative tags
1.7.0
Official
Comments
1.7.0
Official
Contacts
3.1.6
Official
Deleted files
1.7.0
Official
DropIt
0.3.0
External sites
3.4.1
Official
Favorites Quickaccess Sorting
1.0.2
Federation
1.7.0
Official
File access control
1.7.0
Official
File sharing
1.9.0
Official
Files automated tagging
1.7.0
Official
First run wizard
2.6.0
Official
Forms
1.1.0
Full text search
1.3.6
Full text search - Files
1.3.6
Gallery
18.4.0
Official
Guests
1.3.1
Impersonate
1.4.0
Official
Log Reader
2.2.0
Official
Metadata
0.10.0
Monitoring
1.7.0
Official
Nextcloud announcements
1.6.0
Official
Notifications
2.5.0
Official
Password policy
1.7.0
Official
PDF viewer
1.6.0
Official
Preview Generator
2.2.0
Privacy
1.1.0
Official
Quota warning
1.6.0
Ransomware protection
1.5.1
README.md
1.1.3
Recommendations
0.5.0
Official
Retention
1.6.0
Official
Right click
0.15.1
Official
Share by mail
1.7.0
Official
Support
1.0.1
Official
Talk
7.0.2
Official
Terms of service
1.3.1
Text
1.1.1
Official
Theming
1.8.0
Official
Update notification
1.7.0
Official
Usage survey
1.5.0
Official
User usage report
1.1.2
Versions
1.10.0
Official
Video player
1.6.0
Official
Viewer
1.2.0
Official
W2G2
3.0.0
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder
Nextcloud configuration:
{
"system": {
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"localhost",
"REMOVED DOMAIN"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"skeletondirectory": "\/mnt\/ncdata\/_skeleton",
"defaultapp": "activity,files",
"dbtype": "pgsql",
"version": "17.0.1.1",
"overwrite.cli.url": "https:\/\/REMOVED DOMAIN\/",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"instanceid": "REMOVED SENSITIVE VALUE",
"log_type": "file",
"logfile": "\/var\/log\/nextcloud\/nextcloud.log",
"loglevel": "2",
"mail_smtpmode": "smtp",
"remember_login_cookie_lifetime": "1800",
"log_rotate_size": "10485760",
"trashbin_retention_obligation": "auto, 180",
"versions_retention_obligation": "auto, 365",
"simpleSignUpLink.shown": "false",
"memcache.local": "\OC\Memcache\APCu",
"filelocking.enabled": true,
"memcache.distributed": "\OC\Memcache\Redis",
"memcache.locking": "\OC\Memcache\Redis",
"redis": {
"host": "REMOVED SENSITIVE VALUE",
"port": 0,
"timeout": 0.5,
"dbindex": 0,
"password": "REMOVED SENSITIVE VALUE"
},
"logtimezone": "Australia\/Melbourne",
"htaccess.RewriteBase": "\/",
"maintenance": false,
"updater.secret": "REMOVED SENSITIVE VALUE"
}
}
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No.
Browser:
Firefox 72.0.1
Operating system:
Windows 10
Console: https://postimg.cc/nsjWNFg2
Nextcloud: https://postimg.cc/7CFR4vyk
I'll have the same issue,
after checking code to be compliant, I got the following statement:
Analysing /var/www/REMOVED SENSITIVE VALUE/apps/forms/lib/Controller/PageController.php
6 errors
line 60: OCP\User - deprecated class must not be imported with a use statement
line 304: User::checkLoggedIn - Method of deprecated class must not be called
line 380: == - is discouraged
line 464: Util::writeLog - Method of deprecated class must not be called
line 542: Util::writeLog - Method of deprecated class must not be called
line 577: Util::writeLog - Method of deprecated class must not be called
Analysing /var/www/REMOVED SENSITIVE VALUE/apps/forms/lib/Controller/ApiController.php
1 errors
line 218: == - is discouraged
Analysing /var/www/REMOVED SENSITIVE VALUE/apps/forms/lib/Db/Event.php
1 errors
line 90: OC_User - Static method of private class must not be called
Analysing /var/www/REMOVED SENSITIVE VALUE/apps/forms/templates/vote.tmpl.php
1 errors
line 24: OCP\User - deprecated class must not be imported with a use statement
App is not compliant
I can confirm the issue, the problem seems to be postgres. Following error comes from the system protocol.
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO "oc_forms_events" ("title", "description", "is_anonymous", "unique", "access", "owner", "created", "hash") VALUES(?, ?, ?, ?, ?, ?, ?, ?)' with params ["Test", "Test", 1, false, "group_admin", "Username", "2020-01-20 19:09:06", "#########"]: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: ""
db-cell oc_forms.unique has type INT(11). The app however tries to insert random strings like sAt3ZJ7Fhenk8M72.
Changing the field type to varchar(64) solved the issue for me so far (even though the app doesn't write anything in in the end)
While I'm waiting for this app to be patched, how do I change the oc_forms.unique field type to varchar(64)?
@nooblag For mysql:
mysql -u root -p to login to your mysql, then you can do use nextcloud; assuming that is how your nextcloud db is called.
Finally ALTER TABLE `oc_forms_events` MODIFY `unique` varchar(64);
@nooblag For mysql:
mysql -u root -pto login to your mysql, then you can douse nextcloud;assuming that is how your nextcloud db is called.
FinallyALTER TABLE `oc_forms_events` MODIFY `unique` varchar(64);
What is about Postgres?
Having problems changing the column, because the column unique is considered as a command.
I don't know how postgres works, just check their documentation i guess.
I found this: https://www.postgresqltutorial.com/postgresql-change-column-type/
The syntax seems to be a little different.
@oldenj
ALTER TABLE oc_forms_events
ALTER COLUMN "unique" type varchar;
@oldenj
ALTER TABLE oc_forms_events ALTER COLUMN "unique" type varchar;Changed the field type, still do not work. Maybe there is another issue, not only this field.
@nooblag For mysql:
mysql -u root -pto login to your mysql, then you can douse nextcloud;assuming that is how your nextcloud db is called.
FinallyALTER TABLE `oc_forms_events` MODIFY `unique` varchar(64);
Thanks a lot!!! ;) that solved my problem!
Should be fixed with v1.1.1. :)
Most helpful comment
@nooblag For mysql:
mysql -u root -pto login to your mysql, then you can douse nextcloud;assuming that is how your nextcloud db is called.Finally
ALTER TABLE `oc_forms_events` MODIFY `unique` varchar(64);