Error in Bridge

Hello,

I’ve installed Wordpress and the Theme Bridge twice, and I keep getting the same error:

Parse error: syntax error, unexpected T_STRING in …/public_html/honestoakseo/wp-content/themes/bridge/framework/modules/woocommerce/woocommerce-functions.php on line 124

Line 124 is

	$product_list = new \Bridge\Shortcodes\ProductList\ProductList();

Here’s the code, including line 124:

/**
  • Loads more function for portfolio.
    */
    if(!function_exists(‘qode_product_ajax_load_category’)) {
    function qode_product_ajax_load_category() {
    $shortcode_params = array();

     if(!empty($_POST)) {
     	foreach ($_POST as $key => $value) {
     		if($key !== '') {
     			$addUnderscoreBeforeCapitalLetter = preg_replace('/([A-Z])/', '_$1', $key);
     			$setAllLettersToLowercase = strtolower($addUnderscoreBeforeCapitalLetter);
    
     			$shortcode_params[$setAllLettersToLowercase] = $value;
     		}
     	}
     }
    
     $html = '';
    
     $product_list = new \Bridge\Shortcodes\ProductList\ProductList();
    
     $query_array = $product_list->generateProductQueryArray($shortcode_params);
     $query_results = new \WP_Query($query_array);
    
     if($query_results->have_posts()): while ($query_results->have_posts()) : $query_results->the_post();
     	$html .= qode_get_woo_shortcode_module_template_part('templates/parts/'.$shortcode_params['info_position'], 'product-list', '', $shortcode_params);
     endwhile; else:
     	$html .= '<p class="qode-no-posts">'.esc_html__('No products were found!', 'qode').'</p>';
     endif;
     wp_reset_postdata();
    
     $return_obj = array(
     	'html' => $html,
     );
    
     echo json_encode($return_obj); exit;
    

    }

    add_action(‘wp_ajax_nopriv_qode_product_ajax_load_category’, ‘qode_product_ajax_load_category’);
    add_action( ‘wp_ajax_qode_product_ajax_load_category’, ‘qode_product_ajax_load_category’ );
    }

Hello :smiley:

Here is the author of that theme’s support information - https://themeforest.net/item/bridge-creative-multipurpose-wordpress-theme/7315054/support

Thanks!

It’s past it’s support time, and I can’t purchase a new one. Am I out of luck?

Not necessarily :smiley:

Someone here may have seen your issue before, or a Google search may help.

Thanks, I tried some google searching. No luck.

1 Like

What version of PHP are you running? Ask your web host provider if you’re not sure.

I found where it said. It was 5.2. Updated it to 7.0

Then went back to my site and it gave me this:

Fatal error: Uncaught Error: Class ‘QodeImportExport’ not found in /home3/xco98bik/public_html/honestoakseo/wp-content/themes/bridge/framework/admin/options/importexport/map.php:12 Stack trace: #0 /home3/xco98bik/public_html/honestoakseo/wp-includes/class-wp-hook.php(286): qode_import_export_options_map(’’) #1 /home3/xco98bik/public_html/honestoakseo/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #2 /home3/xco98bik/public_html/honestoakseo/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /home3/xco98bik/public_html/honestoakseo/wp-content/themes/bridge/framework/admin/options/qode-options-setup.php(38): do_action(‘qode_options_ma…’) #4 /home3/xco98bik/public_html/honestoakseo/wp-includes/class-wp-hook.php(286): qode_admin_map_init(’’) #5 /home3/xco98bik/public_html/honestoakseo/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(’’, Array) #6 /home3/xco98bik/public_html/honestoakseo/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #7 /home3/xco98bik/public_html/honestoakseo in /home3/xco98bik/public_html/honestoakseo/wp-content/themes/bridge/framework/admin/options/importexport/map.php on line 12

Perfect. PHP 5.2 would have caused the original error in question.

This is a weird one. I would recommend trying a full reinstall of the theme with the latest install file from your downloads section (switch to another theme temporarily, delete all bridge files in wp-content/themes, and then reinstall bridge).

1 Like

Reinstalled Bridge, same problem.

Perhaps you’re using the wrong page for importing/exporting? Try reading over this section of the theme’s documentation:

http://bridge.qodeinteractive.com/documentation/3-demo-content/3-1-qode-import/

Let me know how it goes. :slight_smile:

I read the documentation. It offers a manual and .zip upload install, your choice. I’ve tried both. No luck.