I know that Concrete CMS v8.5.x is not necessarily in-support, but for long-winded reasons I’m responsible for multiple v8.5.x installs that have blockers preventing them from upgrading to v9.x any time soon.
I just noticed that job sets have been behaving unreliably compared to in the past. In that, something along the way has broken running them through cron jobs via wget generated URL (or equivalent command).
When testing the URLs I get “unknown job”.
So when I try to toggle a Job Set between “scheduled” and “cron” mode, updating to cron mode throws this error 100% of the time:
An exception occurred while executing ‘UPDATE JobSets SET isScheduled = ?, scheduledInterval = ?, scheduledValue = ? WHERE jsID = ?’ with params [false, “days”, “0”, “6”]: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: ‘’ for column ‘isScheduled’ at row 1
I have no idea what lead to this issue or what I can do to fix the SQL issue. I’m on v8.5.19 and if anyone has any ideas on what I can do to fix this, that’d be great.
I’m thinking there may be some database cruft in the environment, unsure if it’s related, but every now and then I’ll go try to make changes to the root page (and this seems to ONLY happen on the root page, for just one of the sites) and it will give me a SQL error before I even save the changes. When this happens I have to go and delete the entry in the database manually, and then it works just fine. From what I understand it is a “version of a block” that was added to a page version # that doesn’t exist, and I haven’t yet figured out why that keeps happening.
Thanks for any thoughts!
There is an issue with the data being saved. isScheduled should be 0 or 1 but it’s trying to save “false”
in concrete\src\Job\Set.php around line 247 you have:
$db->query("UPDATE JobSets SET isScheduled = ?, scheduledInterval = ?, scheduledValue = ? WHERE jsID = ?", array($this->isScheduled, $this->scheduledInterval, $this->scheduledValue, $this->getJobSetID()));
$this->isScheduled is set to true or false a few lines above it.
So modify the code to become:
$db->query("UPDATE JobSets SET isScheduled = ?, scheduledInterval = ?, scheduledValue = ? WHERE jsID = ?", array((int)$this->isScheduled, $this->scheduledInterval, $this->scheduledValue, $this->getJobSetID()));
So $this→isScheduled becomes an integer. It should fix the problem.
1 Like
Yeah it was:
$db->query("UPDATE JobSets SET isScheduled = ?, scheduledInterval = ?, scheduledValue = ? WHERE jsID = ?",
array($this->isScheduled, $this->scheduledInterval, $this->scheduledValue, $this->getJobSetID()));
So going to try the proposed change. Any idea how on earth I got into this state?
Also, any thoughts on my other versioning issue I mentioned in the original post?
Either way, thanks for your help! Gonna try this right now 
Okay I made the change as you recommended on line 248, however I get I think the same results:
An exception occurred while executing ‘UPDATE JobSets SET isScheduled = ?, scheduledInterval = ?, scheduledValue = ? WHERE jsID = ?’ with params [false, “days”, “0”, “1”]: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: ‘’ for column ‘isScheduled’ at row 1
So I’m going to revert to the previous contents for line 248 out of precaution. Any other ideas?
That’s the only place, as far as I can tell, where that error would be thrown.
I have to point out that the code is still trying to save “false” instead of “0” so either there is another piece of code that I didn’t notice doing the saving, or you didn’t actually modify the code the way I suggested.
It would be useful if you provided the whole error stack so we know where the error originated instead of just the error message.
How exactly can I collect the whole error stack to deliver here? I’m not sure the best way to do that.
if you enabled full debugging output from the dashboard it will show you the error message and a list of files. The first of which will probably be exactly where the error happens along with the line number. That will let you check whether the file I pointed out was correct. Otherwise in the logs, look for that error and the file and line number will probably be there as well.
=====
Doesn’t seem to be talking about the file you had in mind.