简体   繁体   中英

Joomla - parse error on site - how do i fix it?

I had someone create a joomla site for my business and they handled all coding of the site and I have no knowledge of how it was done. My site currently is showing this message -

Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in..

(additional code is show hereafter).

You can see the code on www.urbanlifeandstyle.com . I have access to the backend of the site and need instructions on how to fix this since my site needs to be active and I have no access to the person who created my site using joomla. Thank you for your help.

Line 35 should not have an if conditional in /components/com_content/helpers/route.php

This is how the file should look in newer versions of Joomla.

32         public static function getArticleRoute($id, $catid = 0, $language = 0)
33         {
34                 $needles = array(
35                         'article'  => array((int) $id)
36                 );
37
38                 // Create the link
39                 $link = 'index.php?option=com_content&view=article&id=' . $id;
40

I can't tell your Joomla version other than I think it's 3.1.x, from what i can tell from the copyrights and one other file.

If you don't have a backup, create one. If you do, try to restore from it but not until after making a backup. From your Godaddy Hosting Manager you should be able to manage backups. You'll want to be sure to create a backup just in case. The hosting manager area should also list backups that have been made. It may be possible the developer never made backups. It happens sometimes and it's unfortunate.

Hopefully the developer created the site in the correct manner and didn't override any of the core files. If he didn't then you'll need to unzip the Joomla installation archive to place a clean copy of the files on the server, then remove the installation folder ~/html/installation . This should restore the original unmodified files. You'll need to use the same version of Joomla that's currently installed on the site. You can view the current version by logging into the website's administration area which is still operational.

If all else fails, I guess you could try to get the original developer Taylor Williams Design Group to fix it.

I can tell as it is that after you get it working, you'll want to upgrade Joomla to the newest version and I don't know if I would recommend the iCagenda event form like you are on the site which has uploads. SEO urls are not being used also.

Here's a link where you can view your site. If you go to your site, some links work and others don't. The ones that don't are using com_content , so that leads me to think that com_content is the module with the issue.

http://www.urbanlifeandstyle.com/index.php?option=com_contact&view=contact&id=2&Itemid=722

Hope you can get it sorted out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM