0
votes

I'm getting this error when I try to go to my site. The last thing I did was uninstall one blog extension and installed a new one.

Error: Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/mcflipp/public_html/vqmod/vqcache/vq2-catalog_controller_common_header.php on line 341

The code on that line is:

'href'  => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']),
'id' => $category['category_id']. '_' . $child['category_id'],

And the code that matches in the catalog/controller/common/header.php is:

$children_data[] = array(
    'name'  => $child['name'],
    'href'  => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']),
    'id' => $category['category_id']. '_' . $child['category_id'],
    'children_level_2' => $children_data_level_2,
);

The syntax looks correct to me, so I'm not sure what needs to be changed. I appreciate any help!

1
Post the full contents of the vq2-cata... file (or a link to a pastebin of it)Jay Gilford
Here ya go! I did look at it more in depth and I think something is funky with the indentations, so I'm wondering if something is missing in that area. (pastebin.com/LegAvFYY)jenashley
OK, well as Shadyyx has pointed out, the issue is a vQmod you've got installed. One of them is badly coded and is messing up the PHP in that file. You'll need to debug which by disabling them one by oneJay Gilford

1 Answers

1
votes

Well, looking at your code, I can see a problem in this part of the file:

                                                    // Level 1
                                                    $this->data['categories'][] = array(
                                                            'name'     => $category['name'],
                                                            'children' => $children_data,
                                                            'column'   => $category['column'] ? $category['column'] : 1,
                                                            'href'     => $this->url->link('product/category', 'path=' . $category['category_id'])
                                                    );
                                            }
                                    }
                            }                      
































                                                    'href'  => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']),
                                                    'id' => $category['category_id']. '_' . $child['category_id'],
                                                    'children_level_2' => $children_data_level_2,
                                    );             
                            }

This one looks like incorrect vQmod replacement/addition to a file... Either you have applied a version of extension that does not support your version of OC or you have made some manual changes to the file that vQmod is trying to inject. It could be also possible that the extensions itself is malfunctioning. Check the vQmod XML file for this extension and identify the piece that is responsible for this concrete injection.

Hint: using an advanced PHP IDE can help to point to basic PHP syntax errors (e.g. like this above) by highlighting and marking the erroneous place in red (I am using NetBeans for example).