anvc / scalar

Born-digital, open source, media-rich scholarly publishing that’s as easy as blogging.
Other
231 stars 73 forks source link

Uncaught Exception: Could not resolve version ID before saving to the semantic store #187

Closed schnydszch closed 2 years ago

schnydszch commented 2 years ago

I cannot save a page for a scalar I created, I am getting the following error: PHP Fatal error: Uncaught Exception: Could not resolve version ID before saving to the semantic store. in /var/www/scalar/system/application/models/version_model.php:548\nStack trace:\n#0 /var/www/scalar/system/application/controllers/api.php(179): Version_model->create()\n#1 /var/www/scalar/system/core/CodeIgniter.php(360): Api->add()\n#2 /var/www/scalar/codeigniter.php(203): require_once('/var/www/scalar...')\n#3 {main}\n thrown in /var/www/scalar/system/application/models/version_model.php on line 548, referer: https://url.of.my.scalarsite/republic-acts-of-national-impact-18th-congress-of-the-philippines/new.edit. What could be the problem why it is not saving. My Php version is 7.4.3 and Scalar 2.6

schnydszch commented 2 years ago

Hi! It seems I got this error because of a long title. After putting a shorter title, I was able to save the page.

craigdietrich commented 2 years ago

Ah, yep, this has come up before. I've had it on my list to trim the slug when a title is long like that. Thanks for the report!