Urgent help, all back office disappeared with the last update
-
Just installed 1.5, and the fields are in the front, but not in the back
-
Hi @alexadark, sorry for the trouble.
It’s possible that the problem is related to the initialization. We needed to change the initialization hook to
init
with priority 0. If you use the same hook in your code for initializing CF, please change it toafter_setup_theme
.Here are some related issues on GitHub that might help: #162, #165
The only thing i have done is what you indicate here : https://carbonfields.net/docs/carbon-fields-getting-started/
my fields are in a plugin
For the moment i have rolled back to the previous version.
That’s really annoying, i am using carbon fields in almost all my themes, but i don’t do maintenance for my clients.
It means that i have to go back to all the sites to fix this, once i will have the solution
For the moment i don;t have so much. but i really hope you will not do things like that in the future, it can really be very problematicSo tell me what i can do to fix that and update without problems
Hello,
Could you post in here your container definition?
One potential issue with this update, is a change in Container definition behavior, when using
show_on_template
, you must useshow_on_post_type('page')
as well. This was previously not needed since Pages were the only post type allowed to have templates. From WordPress 4.7 this is changed, so we have addressed it in Carbon Fields.Hi,
it’s very strange, i made a copy of the website update again on this on, and everything was ok.
tried on the original site, same problem
i have 3 types of custom fields
options : no pb on this ones
normal cf: no problem
groups of custom fields : these are the ones affected, front end stills ok, but they all disappear from the backend, the add entry is there but i cannot register anythingthis is the code which register them :
<?php use Carbon_Fields\Container; use Carbon_Fields\Field; $classes = Field::make( 'text', 'crb_class' ); $id = Field::make( 'text', 'crb_id' ); $content = Field::make( 'rich_text', 'crb_content' ); $title = Field::make( 'text', 'crb_title' ); $link = Field::make( 'text', 'crb_link' ); $subtitle = Field::make( 'text', 'crb_subtitle' ); $image = Field::make( 'image', 'crb_image' ); $description = Field::make( 'text', 'crb_slide_description', 'Description' ); $name = Field::make( 'text', 'crb_name' ); $country = Field::make( 'text', 'crb_country' ); $select_bg = Field::make( 'select', 'crb_select_bg', 'Select Background Color' ) ->add_options( array( 'white' => 'White', 'grey' => 'Light Grey', 'beige' => 'Beige', 'pink' => 'Light Pink', 'dark' => 'Dark Grey' ) ); $select_filter = Field::make( 'select', 'crb_select_filter', 'Select Alphabetical Filter' ) ->add_options( array( 'a_f' => 'A-F', 'g_m' => 'G-M', 'n_r' => 'N-R', 's_z' => 'S-Z', ) ); $select_col_number = Field::make( 'select', 'crb_select_col_number', 'Select Number of Columns' ) ->add_options( array( '2' => '2 Columns', '3' => '3 Columns', '4' => '4 Colums', ) ); $select_text_style = Field::make( 'select', 'crb_select_text_style', 'Select Text Style' ) ->add_options( array( 'normal' => 'Normal', 'large' => 'Large', 'small' => 'Small', ) ); $select_source = Field::make( 'select', 'crb_select_source', 'Select multimedia source' ) ->add_options( array( 'youtube' => 'Youtube', 'vimeo' => 'Vimeo', 'mp3' => 'Mp3', 'embed' => 'Embed Link' ) ); Container::make( 'post_meta', 'layouts' ) ->show_on_post_type( 'page' ) ->add_fields( array( Field::make( 'complex', 'crb_block_layouts' )->set_layout( 'tabbed-vertical' ) /** * BIG HEADING */ ->add_fields( 'big_heading', array( $select_bg, $id, Field::make( 'text', 'crb_number' ), $title, ) ) /** * 4 COLUMNS LISTS */ ->add_fields( 'four_column_lists', array( $select_bg, Field::make( 'complex', 'crb_list' )->set_layout( 'tabbed-vertical' ) ->add_fields( array( $title, Field::make( 'complex', 'crb_list_item' )->set_layout( 'tabbed-horizontal' ) ->add_fields( array( $name, Field::make( 'text', 'crb_position' ), ) ) ) ) ) ) /** * SLIDER */ ->add_fields( 'slider', array( $select_bg, Field::make( 'complex', 'crb_slides' )->set_layout( 'tabbed-horizontal' ) ->add_fields( array( $title, $image, $description, Field::make( 'text', 'crb_artist_name' ), $country, Field::make( 'text', 'crb_email' ), Field::make( 'text', 'crb_website' ), $link, ) ) ) ) /** * FILTERABLE LIST */ ->add_fields( 'filterable_lists', array( $select_bg, $select_col_number, Field::make( 'complex', 'crb_filterable_list_item' ) ->add_fields( array( $select_filter, $name, $country, $link, ) ) ) ) /** * TEXT EDITOR */ ->add_fields( 'text_editor', array( $classes, $select_bg, $select_text_style, $content, ) ) /** * LEFT/RIGHT */ ->add_fields( 'left_right', array( $select_bg, Field::make( 'complex', 'crb_left_right_item' )->set_layout( 'tabbed-horizontal' ) ->add_fields( array( $image, $description, Field::make( 'text', 'crb_type' ), $title, $content, $link, ) ) ) ) /** * ACCORDION */ ->add_fields( 'accordion', array( $select_bg, Field::make( 'complex', 'crb_accordion_item' )->set_layout( 'tabbed-horizontal' ) ->add_fields( array( $title, $content, ) ) ) ) /** * MULTIMEDIA MODAL BOXES */ ->add_fields( 'multimedia_modal_boxes', array( $select_bg, $select_col_number, $title, Field::make( 'complex', 'crb_multimedia_modal_box_item' )->set_layout( 'tabbed-horizontal' ) ->add_fields( array( $select_source, $image, $title, $content, $link, Field::make( 'text', 'crb_modal_title' ), Field::make( 'image', 'crb_modal_image' ), $description, ) ) ) ) /** * GRANTS GRID */ ->add_fields( 'grants_grid', array( $title, Field::make( 'relationship', 'crb_grants_to_display' ) ->set_post_type( 'grants' ) ) ) /** * COUNTRIES POP UP */ ->add_fields( 'countries_pop_up', array( Field::make('complex','crb_country_names') ->add_fields( array( $country, )) ) ) ) );
WordPress 4.7
Carbon Fields 1.5Containers may be assigned to pages using specific template:
->show_on_template($template_path)
Does not work. In the back.- This reply was modified 7 years, 4 months ago by eevm.
@eevm i don’t understand what you mean…in my case container is just assigned to pages with
->show_on_post_type( ‘page’ )->show_on_post_type( ‘page’ )
For my problem does not fit.Solved a problem.
->show_on_page($page_id)Thank you!
->show_on_post_type(‘page’)->show_on_template($template_path)
Also works!
- The topic ‘Urgent help, all back office disappeared with the last update’ is closed to new replies.