Tagify output bug

Wappler Version : 4.7.1
Operating System : Windows 10 x64
Server Model: NodeJS
Database Type: PostgreSQL
Hosting Type: Docker

If Tagify component has more than 100 elements - it’s output contains weird structure.
Starting from 101 element - Tagify sends wrong structure.

I’ve deleted all 97 elements from output just to save space and left 98, 99 and 100 elements.
How to reproduce: add to Tagify 105 elements and try to send if via Server Connect form.

{"test":["2323","2324","2423",{"101":"2424"},{"102":"2425"},{"103":"2426"},{"104":"2427"},{"105":"2428"}]}

Do you also have an file upload in the form?

Yes I do.

Try it with this update: upload.zip (793 Bytes) Unzip to lib/setup.

Unfortunately - still same, even worth.
Starting from 21th element - output becomes "broken"

{"test":["2429","2430","2431","2432","2433","2434","2435","2436","2437","2438","2439","2440","2441","2442","2443","2444","2445","2446","2447","2448","2449",{"21":"2450"},{"22":"2451"},{"23":"2452"},{"24":"2453"},{"25":"2454"},{"26":"2455"},{"27":"2456"},{"28":"2457"},{"29":"2458"},{"30":"2459"},{"31":"2460"},{"32":"2461"},{"33":"2462"},{"34":"2463"},{"35":"2464"},{"36":"2465"},{"37":"2466"},{"38":"2467"},{"39":"2468"},{"40":"2469"},{"41":"2470"},{"42":"2471"},{"43":"2472"},{"44":"2473"},{"45":"2474"},{"46":"2475"},{"47":"2476"},{"48":"2477"},{"49":"2478"},{"50":"2479"},{"51":"2480"},{"52":"2481"},{"53":"2482"},{"54":"2483"},{"55":"2484"},{"56":"2485"},{"57":"2486"},{"58":"2487"},{"59":"2488"},{"60":"2489"},{"61":"2490"},{"62":"2491"},{"63":"2492"},{"64":"2493"},{"65":"2494"},{"66":"2495"},{"67":"2496"},{"68":"2497"},{"69":"2498"},{"70":"2499"},{"71":"2500"},{"72":"2501"},{"73":"2502"},{"74":"2503"},{"75":"2504"},{"76":"2505"},{"77":"2506"},{"78":"2507"},{"79":"2508"},{"80":"2509"},{"81":"2510"},{"82":"2511"},{"83":"2512"},{"84":"2513"},{"85":"2514"},{"86":"2515"},{"87":"2516"},{"88":"2517"},{"89":"2518"},{"90":"2519"},{"91":"2520"},{"92":"2521"},{"93":"2522"},{"94":"2523"},{"95":"2524"},{"96":"2525"},{"97":"2526"},{"98":"2527"},{"99":"2528"},{"100":"2529"},{"101":"2530"},{"102":"2531"},{"103":"2532"},{"104":"2533"},{"105":"2534"},{"106":"2535"},{"107":"2536"},{"108":"2537"},{"109":"2538"},{"110":"2539"},{"111":"2540"},{"112":"2541"},{"113":"2542"},{"114":"2543"},{"115":"2544"},{"116":"2545"},{"117":"2546"},{"118":"2547"},{"119":"2548"},{"120":"2549"},{"121":"2550"},{"122":"2551"},{"123":"2552"},{"124":"2553"},{"125":"2554"},{"126":"2555"},{"127":"2556"},{"128":"2557"},{"129":"2558"},{"130":"2559"},{"131":"2560"},{"132":"2561"},{"133":"2562"},{"134":"2563"},{"135":"2564"},{"136":"2565"},{"137":"2566"},{"138":"2567"},{"139":"2568"},{"140":"2569"},{"141":"2570"},{"142":"2571"},{"143":"2572"},{"144":"2573"},{"145":"2574"},{"146":"2575"},{"147":"2576"},{"148":"2577"},{"149":"2578"},{"150":"2579"},{"151":"2580"},{"152":"2581"},{"153":"2582"},{"154":"2583"},{"155":"2584"},{"156":"2585"},{"157":"2586"},{"158":"2587"},{"159":"2588"},{"160":"2589"},{"161":"2590"},{"162":"2591"},{"163":"2592"},{"164":"2593"},{"165":"2594"},{"166":"2595"},{"167":"2596"},{"168":"2597"},{"169":"2598"},{"170":"2599"},{"171":"2600"},{"172":"2601"},{"173":"2602"},{"174":"2603"},{"175":"2604"},{"176":"2605"},{"177":"2606"},{"178":"2607"},{"179":"2608"},{"180":"2609"},{"181":"2610"},{"182":"2611"},{"183":"2612"},{"184":"2613"},{"185":"2614"},{"186":"2615"},{"187":"2616"},{"188":"2617"},{"189":"2618"},{"190":"2619"},{"191":"2620"},{"192":"2621"},{"193":"2622"},{"194":"2623"},{"195":"2624"},{"196":"2625"}]}

Seems that the dynamic limit didn’t work, I have set the limit to 1000 now instead of 100.

upload.zip (761 Bytes)

This version is working fine.
But can you remove this limit or set to some kind of 100000?

Why I’m asking is that I’m currently trying to develop an event management system and I’m using Tagify to visually represent invitation list with emails. We have more than 10000 employees and limit for 1000 won’t fit our needs.

The limit is there for a reason, someone could post a[999999999] to your server which would then generate an array with 999999999 items. Looping that array would take a long time and would make the server unresponsive.

There are more limits, we use the qs module to parse the data. You can change the limit on line 33 of the upload.js file. This is only for forms wich also have a file upload.

Options for qs: ljharb/qs: A querystring parser with nesting support (github.com)

1 Like

Thank you for technical explanation.

I faced this limit in an unrelated use case before I figured out that creating a single hidden element with a json representation of the array was a better way to go.

You might find that helpful, although your requirements look tied to tagify.

The hidden input inside the form gets a dynamic value set to a stringified version of the array. Then on the server side you parse that json and use it as an array again.

1 Like

Thank you for the advise.
My second version of this form is using List Group and Hidden array, but Tagify looks much intuitive for end user and my UI skills are far away of designing same visual approach! :slight_smile:

I don’t think tagify with 10000 users will be useful UI.

If you want to present so many choices you should consider a different UI approach.

Like for example having a modal with paged list and filter on top of it for searching.

2 Likes