Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悶 fix: page container unmount failed #1211

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

KevinChenYF
Copy link

When the page loads too fast, the container uninstallation fails, causing the page to be unable to determine whether to uninstall the specified container based on conditions.

@KevinChenYF
Copy link
Author

Use the classic editor and bugs will occur when editing the "page"

@HTMLBurger-NG
Copy link
Collaborator

Thank you for submitting your pull request. After reviewing it, we found that it unfortunately causes disruptions in other aspects of the package's functionality.

Regarding the issue you mentioned about the page loading too quickly for the fields/containers to appear, we haven't been able to replicate this problem on our end. Could you please provide a specific example or steps to reproduce this issue? This would allow us to conduct a more thorough investigation locally.

For your reference, we have conducted tests on our package using the latest version, 3.6.3, in an environment with WordPress 6.4.2 and PHP version 8.1.27.

@KevinChenYF
Copy link
Author

Sorry, my English is not very good, here is my description through translation.

Current version. PHP: 7.4.3 wordpress:6.4.2

Step 1: Install the "Classic Editor" plugin.
Step 2: Configure the following fields

// template contact
add_action( 'carbon_fields_register_fields', function () {
    global $demo_arr;
    global $demo_arr; $test_options = [];

    Container::make( 'post_meta', __( 'Content settings' ) )
        ->where( 'post_type', '=', 'page' )
        ->add_tab( __( 'test' ), array_merge(array(
            Field::make( 'image', 'image1', __( 'Image' ) ),
            Field::make( 'rich_text', 'text1', 'Text' ),
            Field::make( 'multiselect', 'crb_available_colors', __( 'Available Colors' ) )
                ->add_options( $demo_arr ), .
        ), $test_options) );
}).

// template contact2
add_action( 'carbon_fields_register_fields', function () {
    Container::make( 'post_meta', __( 'Content settings' ) )
        ->where( 'post_type', '=', 'page' )
        ->where( 'post_template', '=', 'templates/contact.php' )
        ->add_tab( __( 'test2' ), array(
            Field::make( 'image', 'image1', __( 'Image' ) ),
            Field::make( 'text', 'text2', __( 'Text' ) ), ); field::make( 'text', 'text2', __( 'Text' ), )
        ) );
});

Step 3, "Add New Page", at this time to view the page rendering code is found, both containers of fields are rendered. There are two input elements with name="carbon_fields_compact_input[_image1]".
20240118150338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants