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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cater for ACF field type message #2

Open
bobbingwide opened this issue Jun 12, 2023 · 1 comment
Open

Cater for ACF field type message #2

bobbingwide opened this issue Jun 12, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@bobbingwide
Copy link
Owner

When I tried to use the ACF field type of message the response from render() was :288eh?
This output is produced when the request to get_field_object() returns null.

2 things:

  1. Cater for the fact that ACF fields of type message do not get assigned a field name.
  2. Improve the debug information... display an Error of some kind in place of the existing code
echo $this->field_name;
print_r($this->field_info);
echo ':';
echo $this->post_id;
echo 'eh?';
@bobbingwide bobbingwide added the bug Something isn't working label Jun 12, 2023
@bobbingwide bobbingwide self-assigned this Jun 12, 2023
@bobbingwide
Copy link
Owner Author

Note: In acf_field_block_get_possible_field_names() we can see that the "Message" field is registered as:

        [ID] => (integer) 379
        [key] => (string) "field_648729d7cffd8"
        [label] => (string) "Message"
        [name] => (string) ""
        [aria-label] => (string) ""
        [prefix] => (string) "acf"
        [type] => (string) "message"
        [value] => (boolean) 
        [menu_order] => (integer) 27
        [instructions] => (string) ""
        [required] => (integer) 0
        [id] => (string) ""
        [class] => (string) ""
        [conditional_logic] => (integer) 0
        [parent] => (integer) 56
        [wrapper] => *RECURSION* wrapper 1
        [message] => (string) "This is a message."
        [new_lines] => (string) "wpautop"
        [esc_html] => (integer) 0
        [_name] => (string) "message"
        [_valid] => (integer) 1

@bobbingwide bobbingwide changed the title Cater for field type message Cater for ACF field type message Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant