Version X issues with I suspect content blocks

I am using version x with context blocks and when I install it I get ALOT of errors and after the install it does not seem to save any old version of the page

does it mean there is DB issues I am using mariadb with InnoDB and utf8mb4_unicode_ci

errors are sql insert errors example below
Iterating over Resources and storing snapshots.

Error HY000 executing statement: INSERT INTO jed_versionx_resource (content_id, user, mode, marked, title, context_key, class, content, fields, tvs) VALUES (1, 1, ‘snapshot’, 0, ‘Home’, ‘web’, ‘MODX\Revolution\modDocument’, ’

\n

\n

\n

\n

\n [[cbGetFieldContent? &field=25 &tpl=inbannerimgTpl &limit=1 &offset=1]]\n

ETC ETC

Does it give a reason at the end of the error message why the INSERT statement fails?

no it just give sql insert error
and after that it seems to be installed ok
but it does not save any versions

so my guess is that it is an insert issue on the resources it does not like some characters maybe a conditioinal statement issue?

because when I install it to only do e.g. plugins and chunks this works fine its just on resources that it does not work, maybe its content blocks add on? it does not like some characters perhaps

Can you maybe test the INSERT statement that fails manually with phpMyAdmin and see if that gives you a more detailed error message.


This could be! But I don’t think ContentBlocks adds some special characters.

thanks for the reply. i also dont think it does. but will go through all the errors maybe there is a funny character that end user inserted will check page by page let me see if I can find it.

The way these MySQL errors are formatted is that there’s an array with 3 elements at the end. As you’re getting a very long error because it’s dumping the resource content, that’s going to be easy to miss. Please double check Harry’s suggestion.

ah ok at I found it at the end

"_isContentBlocks";b:0;}}s:13:"alias_visible";b:1;}', ‘a:0:{}’) Array ( [0] => HY000 [1] => 1364 [2] => Field ‘version_id’ doesn’t have a default value )

so it does not like version_id?

maybe I delete the database tables of version X and try install again?

The column “version_id” is the primary key column.
Shouldn’t it automatically create a primary key for new rows?

Maybe check the column in phpMyAdmin to see if AUTO_INCREMENT is enabled.
Is it different than the columns with the same name in the other VersionX tables?