Bludit: v2.0: Notice "Undefined index" error when adding new content

Created on 18 Oct 2017  路  6Comments  路  Source: bludit/bludit

Most helpful comment

I found the bug. In Bludit v1 Posts do not have a position. The migration script does not set a default position for the post.

@dignajar Should I set a default position for every post in the migration script and what should I set it? 1?
A temporary workaround is to check if position is set in dbpages.class.php
Line 334

            if (isset($fields['position']) && $fields['position']>$tmp) {

This gets rid of the notices.

All 6 comments

The error means that the counter for the position cannot find the input field.

Is it a fresh installation or an updated installation? Are there any additional plugins installed?

@clickwork-git updated installation via migrate.php script with few additional plugins (ads4u, addtoany, textarea and yandextools).

I will try to reproduce it.

I found the bug. In Bludit v1 Posts do not have a position. The migration script does not set a default position for the post.

@dignajar Should I set a default position for every post in the migration script and what should I set it? 1?
A temporary workaround is to check if position is set in dbpages.class.php
Line 334

            if (isset($fields['position']) && $fields['position']>$tmp) {

This gets rid of the notices.

@anaggh yes is ok, you can set the default value as 1.

fixed it!

Was this page helpful?
0 / 5 - 0 ratings