michaeluno / admin-page-framework

Facilitates WordPress plugin and theme development.
http://admin-page-framework.michaeluno.jp/
Other
337 stars 71 forks source link

There is an error in repeating fields #232

Closed SUGO-es closed 8 years ago

SUGO-es commented 8 years ago

There is an error in repeating fields, these are not properly displayed or stored.

I'm looking for the reason, if I find some reason'll let you know here.

captura

michaeluno commented 8 years ago

I neither see any problem from your picture nor confirm any problem in my environment. Can you mark the fields having an issue in the picture?

Also post more details including the followings:

SUGO-es commented 8 years ago

Hi michaels

Sorry for not giving more details, my environment is as follows:

WP = 4.4.1 APF = 3.7.11

The problem is these repeated fields In my plugin I have the same behavior with a compilation generated useful compilation. In principle teaches values, you change values and guards, then disappear.

captura

I have no error displayed on the console of Chrome. No error php on log.

Thank you for this great plugin and their hard work.

SUGO-es commented 8 years ago

I confirm that the values are kept by APF, but are not shown later.

[sizes_field] => Array
                (
                    [0] => Array
                        (
                            [0] => Array
                                (
                                    [size] => 3415
                                    [unit] => g
                                )

                        )

                    [1] => Array
                        (
                            [0] => Array
                                (
                                    [size] => 13400
                                    [unit] => mm
                                )

                        )

                    [2] => Array
                        (
                            [0] => Array
                                (
                                    [size] => 343430
                                    [unit] => mb
                                )

                        )

                )
michaeluno commented 8 years ago

I could confirm the problem.

It seems to have started since v3.7.0.

The saved options structure appears to be wrong. It should be like

[sizes_field] => Array
                (
                        [0] => Array
                            (
                                [size] => 3415
                                [unit] => g
                            )

                    )

Probably the wrong name attribute value of the input is generated. I'll investigate it.

Thanks for the report.

michaeluno commented 8 years ago

Should have been fixed in the development branch. It would be appreciated if you could confirm it works.

SUGO-es commented 8 years ago

Hi

I confirm that I now works well both as APF plugin and compiled within my plugin.

Thank you very much for your quick support, I am birseye endeavor to assist in any way possible.