fontsampler-wordpress-plugin icon indicating copy to clipboard operation
fontsampler-wordpress-plugin copied to clipboard

255 is the largest ID that can be used.

Open MalcolmWooden opened this issue 2 years ago • 7 comments

Could it be possible to increase this limit?

MalcolmWooden avatar Jun 01 '22 16:06 MalcolmWooden

What's the context for this? Automatically extracting the name from the font file?

kontur avatar Jun 02 '22 11:06 kontur

I've got to id254 and I can't make any more fontsamplers.

MalcolmWooden avatar Jun 07 '22 12:06 MalcolmWooden

Ah, I misunderstood and thought you are talking about font internal IDs.

Can you check your debug.log for errors when attempting to create a Fontsampler? I have a hunch it is related to a limit on WP input variables.

kontur avatar Jun 07 '22 12:06 kontur

Sorry, I should have been more concise in my last comment.

I can make Fontsamplers with ID's > 255. Everything looks good and fontsampler confirms that I can use the new shortcode (e.g. fontsampler id=260). However, when the code is placed on the page, the fontsampler is not displayed.

If I go back to edit the fontsampler, all the information regarding the chosen options (text, size, layout etc.) is missing as if it never got written to the database.

My sites PHP max input variables = 8000 No debug.log file is created when I turn on debugging.

MalcolmWooden avatar Jun 07 '22 15:06 MalcolmWooden

I have only about 50 Fontsamplers, but through making and deleting Fontsamplers, the shortcode id's have gone over 254 and now will not display anything above that number.

MalcolmWooden avatar Jul 05 '22 18:07 MalcolmWooden

This seems to be an issue in the fontsampler_settings table of the database.

The set_id value is defined as tinyinit which restricts the value to 256. Changing this to smallinit solves the limit problem I had been having.

MalcolmWooden avatar Jul 06 '22 10:07 MalcolmWooden

D'oh, that sounds like a silly limit! Thanks for doing such excellent detective work!

kontur avatar Jul 06 '22 21:07 kontur