Closed (fixed)
Project:
The Better Mega Menu
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 May 2015 at 14:30 UTC
Updated:
5 Nov 2020 at 20:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
aubjr_drupal commentedThis is a real issue that our organization has run into with multiple sites; The DB column sizes are too small. Taken from MySQL documentation:
TEXT | 65,535 (216−1) bytes = 64 KiB
MEDIUMTEXT | 16,777,215 (224−1) bytes = 16 MiB
LONGTEXT | 4,294,967,295 (232−1) bytes = 4 GiB
64K isn't enough for large menus. We didn't go as far as a "longtext" - just "mediumtext".
Patch attached, made against the latest dev version.
Note: Since there are no indices/keys affected with this change, I used a simpler db_query() instead of the more formal Database API's db_change_field().
Comment #2
aubjr_drupal commentedComment #3
aubjr_drupal commentedI got the Database API entry incorrect in tb_megamenu.install - Fixed in this comment's patch.
Comment #4
andrewozoneComment #5
quondam commentedThe patch in #3 applies cleanly to 7.73. Including testing & validation process below to reproduce this issue in case the patch needs to be re-rolled and reviewed again at a later date.
Install and enable the Devel and Devel Generate modules, then use the Generate menus link to add a large number of links to the main menu (say, 500+). Once that finishes, edit the config for the main-menu TB Megamenu, changing a few options like style and animation, then save. An Ajax status message will appear, erroneously claiming the changes were saved - however viewing the logs will reveal the SQL error referenced above in the original description, and on a page reload the previous values/default config will still display. After applying the patch, clearing cache and then re-saving the config changes no SQL error is found in the logs; reloading the admin page reveals that the config changes were captured and the form is pre-populated with those values.
Comment #6
knaffles commentedComment #8
knaffles commented