brockpetrie / dynamictextgroup

A Symphony field that provides a method to dynamically add a text field or text field groups to a section entry
22 stars 13 forks source link

field size weirdness #6

Open pixelninja opened 13 years ago

pixelninja commented 13 years ago

If you go into the section editor and save it, with or without changes, the widths of the fields within the DTG screw up. The first one becomes a negative value in the hundreds, normally around -900 for me. While the rest become massive positive values, normally all of which are over 1000.

Then when you try and drag them back into place, they don't move.

The only fix is to alter the DB directly.

Oh and this is on your development branch too.

a-ntoine commented 12 years ago

Yes I have the same issue. Fields end up showing up one by line.

It happens quite often on the 2dev6. But I do find a way to fix it without going to the DB. It just take some time to resize field to their very minimum size.

DavidOliver commented 12 years ago

I also get this sometimes with 2.0dev6, but not always.

fawx commented 11 years ago

this is still happening to me with 2.3.1 and dtg 3.0

brockpetrie commented 11 years ago

I'm not able to replicate this in any webkit browser. Could you guys let me know what you are using? Does this appear to be happening server-side or client-side?

Might be easier if we can peek at the schema object from the browser. Could you do the following and let me know if you see any funkiness happen, and if so, what you were doing when it happened:

Change line 65 in field.dynamictextgroup.php from //$tblocks .= '<span>'.$this->get('schema').'</span>'; to $tblocks .= '<span id="schemaspill">'.$this->get('schema').'</span>';

and then change line 97 in assets/dynamictextgroup.fieldeditor.js from if (schematic[0]) { _f.val(JSON.stringify(schematic)); } else { _f.val(''); } to if (schematic[0]) { _f.val(JSON.stringify(schematic)); $('#schemaspill').text(JSON.stringify(schematic)); } else { _f.val(''); }

This will have JS spit out the field editor object so you can see what's going on.

brockpetrie commented 11 years ago

Also, if one of you manages to take a crack at this locally and finds a solution, I'll happily pull your fix.

fawx commented 11 years ago

i'm having trouble replicating it as well. i fixed it by changing the width values in the database per mark lewis's suggestion, and now i can't seem to screw it up again.