Revolution: long string truncated

Created on 11 Dec 2018  路  4Comments  路  Source: modxcms/revolution

Bug report

Summary

I was trying to inject some css into the head of one of my pages. The css was around 18,000 characters long. I noticed that the content was truncated after around 10,000 characters. I also tried loading the content via a chunk, chunk (static file) and externally from the file system via a snippet with the same result.

Step to reproduce

  1. create a chunk called 'longstring`
  2. go to a site like http://www.blindtextgenerator.com/lorem-ipsum and generate some text that is at least 18,000 characters long
  3. call the chunk into the <head> of your template. for example: <style>[[$longstring]]</style>

Observed behavior

The content is truncated after 10,000 characters.

screen shot 2018-12-11 at 17 35 06

Expected behavior

For the content not be truncated.

I've looked at the storage values for chunks in the db, and all should be good. I can't quite pin down where the limit is coming from.

I appreciate this might be a database character limit, so please feel free to close instantly if so. Apologies in advance!

Environment

MODX 2.7.0
MySQL (what comes with MAMP)
Tested with Database Collation utf8_general_ci and utf8mb4_general_ci using InnoDB

Most helpful comment

@sebastian-marinescu Just tested this again too, using view source and sure enough :) Thanks for testing!

All 4 comments

This looks like the developer-tools-view, where I think long strings are always truncated.
Is the string also truncated in the source-view of the page?

@jonleverrier I've just tested in two different MODX-environments: 2.5.0-pl and 2.7.0-pl

I create a chunk called "test" and added a long string.
I've used this string https://pastebin.com/Ht9AUxnS with 18.000 characters.
In both environments the complete chunk-content got shown.

@sebastian-marinescu Just tested this again too, using view source and sure enough :) Thanks for testing!

@jonleverrier You are welcome! I'm glad we figured it out and that there was no problem 馃槃

Was this page helpful?
0 / 5 - 0 ratings