Hi team,
We are upgrading Newsmag 3.0 and we have encountered an interesting issue.
Let me tell you what is happening.
We created a new Taxonomy called Lifestyle, and through the VC, the editor can select the type of lifestyle on the listing page.
add_action( ‘admin_init’, array( ‘VisualComposerAddon’, ‘extendLifestyleOptions’ ) );
static public function extendLifestyleOptions() {
// Retrieve all Lifestyle taxonomy
$terms = get_terms( taxonomies\LifestyleTaxonomy::TAXONOMYNAME );
if( !is_wp_error( $terms ) && count( $terms ) > 0 ) {
$dropdown = array(
‘Disabled’ => ‘disabled’,
‘All Lifestyles’ => ‘all’
);
foreach( $terms as $term ) {
$dropdown[“- {$term->name}”] = $term->term_id;
}
// Param to be added
$new_param = array(
‘type’ => ‘dropdown’,
‘heading’ => ‘Filter based on lifestyle’,
‘param_name’ => ‘adv_filtering_lifestyle’,
‘group’ => ‘Filter’,
‘admin_label’ => true,
‘value’ => $dropdown,
‘description’ => __( ‘If selected, will further filter the posts based on the lifestyle.<br/>Select DISABLED to disable the filter.’, ‘vc_extend’ ),
‘save_always’ => true
);
vc_add_param( “td_block_slide”, $new_param);
}
}
We can see the new dropdown being added in the VC. However, during the front-page rendering, the system could not identify “adv_filtering_lifestyle” parameter in shortcode_to_args() function under includes/wp_booster/td_data_source.php
We have never encountered this issue up until Newsmag 2.3.6 – only after upgrading to 3.0, things start to be falling apart.
We do not want to downgrade to 2.3.6 again – as we want to keep up to date.
What possible go wrong. For your information, we have been running a child-theme of Newsmag, and includes/wp_booster/td_data_source.php has been cloned in the child-theme
HI
Have you used all the time td_data_source.php file in child theme? Did your custom code worked fine before with this file in child theme?
Since V3 we made some major changes in block’s structure and all atts are now defined in td_block.php file. Maybe new implementation conflict with your code and it may be required an adjustment.
Unfortunately I can’t debug the code provided as this involve custom work and we can’t provide such services at the moment. If you still can’t manage to solve this issue my advice is to look for someone who can help you with implementation or hire a developer to update the code for you.
Thanks!
Hi Andrei,
Yes, we have used td_data_source.php in our child theme.
Yes, the custom code work fine before with this file in our child theme.
It looks like td_block.php is not working on the child theme, doesn’t it?