Jump to content

Increase max characters on Documents


Recommended Posts

Site Documents? The database table CubeCart_documents can hold 2^24 bytes (16.7 million) - be aware that multi-byte unicode can be one, two, or three bytes per certain characters.

Also, the web server has configurable limits on the total size of upload payload. (Consult the web server configuration files.)

Also, PHP has configurable limits on the total size of accepting uploadable data. (Consult PHP's init file. These settings can be seen via CubeCart's admin, PHP Info page - bottom link in admin Nav pane.)


Link to comment
Share on other sites

The byte count of 65,536 is 2^16 -- a very common limit.

The question is: where is that limit?

This next test is going to be wild, and hopefully will shine some light on the culprit.

In admin, Store Settings, Advanced tab, enable the debug mode and then enter your local IP address in the next field (www.showmyip.com).

Bring the target document up for editing. On the content page - perhaps there is still the 65 thousand or so characters - add more text to the bottom.


We expect the added text to get stripped off.

In the debug section below the main area of the admin page, there will be a POST: review. It will look something like this (values will be different):

'document' =>
'doc_name' => Terms and Conditions
'doc_lang' => en-US
'doc_status' => 1
'hide_title' => 0
'doc_url' =>
'doc_url_openin' => 0
'navigation_link' => 1
'doc_parse' => 1
'doc_parent_id' => 0
'doc_id' => 3
'doc_content' => <p>This can be managed under <span class="navTitle">Documents in the admin control panel.</span></p>
'seo_meta_title' =>
'seo_meta_description' =>
'seo_path' => terms-and-conditions
'token' => f2224b4a29ffb32aef568e822b7bd1ea

The 'doc_content' will be very long. But determine if the added text is still present here.

This will split the possible culprits to the browser, web server, PHP vs. the database driver, database server.

Link to comment
Share on other sites

I guess it still shows right?

No Errors or Warnings


'_a' => 'document'
'doc_id' => '3'


'__client' =>
'ip_address' => ''
'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0'
'session_start' => 1669650541
'session_last' => 1669650638
'language' => 'es-ES'
'currency' => 'USD'
'admin_id' => '1'
'user_language' => 'en-US'
'__system' =>
'token' => '184194d04e5434fbac514fd056cc99d4'
'__admin_data' =>
'admin_id' => '1'
'customer_id' => '0'
'status' => '1'
'name' => 'Soporte Tecnico'
'username' => 'AJ'
'new_password' => '1'
'email' => '[email protected]'
'verify' => ''
'logins' => '71'
'super_user' => '1'
'notes' => ''
'failLevel' => '0'
'blockTime' => '0'
'lastTime' => '1669647930'
'browser' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0'
'ip_address' => ''
'language' => 'en-US'
'dashboard_notes' => ''
'order_notify' => '1'
'__admin' =>
'user_language' => 'en-US'
Link to comment
Share on other sites


Well, please let me know the exact version of CubeCart you are using.

Because, it was just a few versions ago (of CubeCart 6) that the the debug data was "spooled up" during certain events (such as processing a POST request), then, when CubeCart finally did send back a page of content, all the spooled debug data was unspooled. If you have a version of CubeCart before this spooling was implemented, then viewing what CubeCart got from a POST payload is going to be difficult to determine (but not impossible).

I see _a=document&doc_id=3 which suggests that you may be using CubeCart version 5.

(You can delete the debug data posted earlier. It has nothing useful.)


Edited by bsmither
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...