SQL Exception Editing Page Type

Permalink 0 0 Browser Info Environment
An exception occurred while executing 'select cID from Pages where cParentID in () and cInheritPermissionsFromCID = ': SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and cInheritPermissionsFromCID =' at line 1

Steps to reproduce.

Perform default install.
Delete all pages except home, empty trash.
Remove all page types,except empty page and blog entry

Add a new page type.
Attempt to edit details->basic details->save

Problem appears to be that when deleting page types, entries are not cleared out of PageTypePageTemplateDefaultPages - mine still have the following entries:

pTemplateID ptID cID
5 5 177
7 6 194
4 5 204
6 5 205
7 5 206
6 7 207 // new bio page, but seems to have reused 7 which was job posting!!
5 10 208 // was portfolio
6 8 209 // was portfolio_project
5 9 210 // was blog

Also the page type ID seems to get reused - my new page type (bio) has a ptID in PageTypes of 7, and the auto_increment seems to have been reset to 8, but page types 7.8.9.10 were deleted

remove the 6,7cID=207 record from PageTypePageTemplateDefaultPages stops the exception from happening.


Status: New
jero

concrete5 Environment Information

# concrete5 Version
Core Version - 8.4.0
Version Installed - 8.4.0
Database Version - 20180524000000

# concrete5 Packages
Automatic Email Obfuscator (2.0.1), Block Designer (3.0.0), Cycle2 Slide Show (1.0.2), EZ Bio (1.0), Manual Nav (2.1.0)

# concrete5 Overrides
blocks/ez_bio/view.php, blocks/ez_bio, blocks/manual_nav/view.php, blocks/manual_nav, blocks/theme_contact/templates/footer/view.php, blocks/theme_contact/templates/footer, blocks/theme_contact/templates, blocks/theme_contact/form.php, blocks/theme_contact/config.json, blocks/theme_contact/controller.php, blocks/theme_contact/edit.php, blocks/theme_contact/icon.png, blocks/theme_contact/composer.php, blocks/theme_contact/view.php, blocks/theme_contact/db.xml, blocks/theme_contact/add.php, blocks/theme_contact, blocks/autonav/templates/offcanvas/view.php, blocks/autonav/templates/offcanvas, blocks/autonav/templates, blocks/autonav, blocks/page_list/templates/cta/view.php, blocks/page_list/templates/cta, blocks/page_list/templates, blocks/page_list, blocks/footer_logos/form.php, blocks/footer_logos/config.json, blocks/footer_logos/controller.php, blocks/footer_logos/edit.php, blocks/footer_logos/icon.png, blocks/footer_logos/composer.php, blocks/footer_logos/view.php, blocks/footer_logos/db.xml, blocks/footer_logos/add.php, blocks/footer_logos, blocks/testimonial/templates/green_brackets/view.php, blocks/testimonial/templates/green_brackets, blocks/testimonial/templates, blocks/testimonial, themes/bootstrap/page_theme.php, themes/bootstrap/default.php, themes/bootstrap/js/bootstrap.offcanvas.min.js, themes/bootstrap/js/dropdown-doubletap.js, themes/bootstrap/js/bootstrap.min.js, themes/bootstrap/js/bootstrap.js, themes/bootstrap/js, themes/bootstrap/css/bootstrap.offcanvas.less, themes/bootstrap/css/theme.less, themes/bootstrap/css/presets/defaults.less, themes/bootstrap/css/presets, themes/bootstrap/css/images/Home-Icon.png, themes/bootstrap/css/images/Footer_Full.png, themes/bootstrap/css/images/TwitterIcon.png, themes/bootstrap/css/images/grid.png, themes/bootstrap/css/images/InstagramIcon.png, themes/bootstrap/css/images/FB-Icon.png, themes/bootstrap/css/images/Email-Icon.png, themes/bootstrap/css/images/Phone-Icon.png, themes/bootstrap/css/images/Footer_40px.png, themes/bootstrap/css/images, themes/bootstrap/css/bootstrap/scaffolding.less, themes/bootstrap/css/bootstrap/jumbotron.less, themes/bootstrap/css/bootstrap/carousel.less, themes/bootstrap/css/bootstrap/mixins/tab-focus.less, themes/bootstrap/css/bootstrap/mixins/grid-framework.less, themes/bootstrap/css/bootstrap/mixins/size.less, themes/bootstrap/css/bootstrap/mixins/labels.less, themes/bootstrap/css/bootstrap/mixins/image.less, themes/bootstrap/css/bootstrap/mixins/buttons.less, themes/bootstrap/css/bootstrap/mixins/background-variant.less, themes/bootstrap/css/bootstrap/mixins/reset-filter.less, themes/bootstrap/css/bootstrap/mixins/resize.less, themes/bootstrap/css/bootstrap/mixins/opacity.less, themes/bootstrap/css/bootstrap/mixins/vendor-prefixes.less, themes/bootstrap/css/bootstrap/mixins/center-block.less, themes/bootstrap/css/bootstrap/mixins/gradients.less, themes/bootstrap/css/bootstrap/mixins/reset-text.less, themes/bootstrap/css/bootstrap/mixins/panels.less, themes/bootstrap/css/bootstrap/mixins/pagination.less, themes/bootstrap/css/bootstrap/mixins/border-radius.less, themes/bootstrap/css/bootstrap/mixins/text-emphasis.less, themes/bootstrap/css/bootstrap/mixins/text-overflow.less, themes/bootstrap/css/bootstrap/mixins/progress-bar.less, themes/bootstrap/css/bootstrap/mixins/forms.less, themes/bootstrap/css/bootstrap/mixins/nav-divider.less, themes/bootstrap/css/bootstrap/mixins/clearfix.less, themes/bootstrap/css/bootstrap/mixins/table-row.less, themes/bootstrap/css/bootstrap/mixins/nav-vertical-align.less, themes/bootstrap/css/bootstrap/mixins/hide-text.less, themes/bootstrap/css/bootstrap/mixins/list-group.less, themes/bootstrap/css/bootstrap/mixins/responsive-visibility.less, themes/bootstrap/css/bootstrap/mixins/grid.less, themes/bootstrap/css/bootstrap/mixins/alerts.less, themes/bootstrap/css/bootstrap/mixins, themes/bootstrap/css/bootstrap/tables.less, themes/bootstrap/css/bootstrap/button-groups.less, themes/bootstrap/css/bootstrap/labels.less, themes/bootstrap/css/bootstrap/responsive-utilities.less, themes/bootstrap/css/bootstrap/bootstrap.less, themes/bootstrap/css/bootstrap/close.less, themes/bootstrap/css/bootstrap/theme.less, themes/bootstrap/css/bootstrap/buttons.less, themes/bootstrap/css/bootstrap/glyphicons.less, themes/bootstrap/css/bootstrap/wells.less, themes/bootstrap/css/bootstrap/tooltip.less, themes/bootstrap/css/bootstrap/modals.less, themes/bootstrap/css/bootstrap/badges.less, themes/bootstrap/css/bootstrap/input-groups.less, themes/bootstrap/css/bootstrap/print.less, themes/bootstrap/css/bootstrap/panels.less, themes/bootstrap/css/bootstrap/type.less, themes/bootstrap/css/bootstrap/variables.less, themes/bootstrap/css/bootstrap/pagination.less, themes/bootstrap/css/bootstrap/popovers.less, themes/bootstrap/css/bootstrap/navs.less, themes/bootstrap/css/bootstrap/mixins.less, themes/bootstrap/css/bootstrap/component-animations.less, themes/bootstrap/css/bootstrap/code.less, themes/bootstrap/css/bootstrap/pager.less, themes/bootstrap/css/bootstrap/forms.less, themes/bootstrap/css/bootstrap/navbar.less, themes/bootstrap/css/bootstrap/progress-bars.less, themes/bootstrap/css/bootstrap/list-group.less, themes/bootstrap/css/bootstrap/media.less, themes/bootstrap/css/bootstrap/grid.less, themes/bootstrap/css/bootstrap/normalize.less, themes/bootstrap/css/bootstrap/alerts.less, themes/bootstrap/css/bootstrap/thumbnails.less, themes/bootstrap/css/bootstrap/responsive-embed.less, themes/bootstrap/css/bootstrap/breadcrumbs.less, themes/bootstrap/css/bootstrap/dropdowns.less, themes/bootstrap/css/bootstrap/utilities.less, themes/bootstrap/css/bootstrap, themes/bootstrap/css/fonts/glyphicons-halflings-regular.ttf, themes/bootstrap/css/fonts/glyphicons-halflings-regular.svg, themes/bootstrap/css/fonts/glyphicons-halflings-regular.eot, themes/bootstrap/css/fonts/glyphicons-halflings-regular.woff2, themes/bootstrap/css/fonts/glyphicons-halflings-regular.woff, themes/bootstrap/css/fonts, themes/bootstrap/css, themes/bootstrap/elements/footer.php, themes/bootstrap/elements/header.php, themes/bootstrap/elements, themes/bootstrap/description.txt, themes/bootstrap/view.php, themes/bootstrap/images, themes/bootstrap

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
fpm-fcgi

# PHP Version
7.0.30

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, intl, json, libxml, mbstring, mcrypt, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 600
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 512M
post_max_size - 10M
sql.safe_mode - Off
upload_max_filesize - 8M
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0