We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Has anyone seen this issue with SEO Lite?

Development and Programming

Russ K.'s avatar
Russ K.
114 posts
9 years ago
Russ K.'s avatar Russ K.

I’m running EE 3.1.2 & I have installed the SEO Lite add on.

After I installed it on a particular site, when I go to the add on manager and then to the configuration options I get this error:

Parse error: syntax error, unexpected '[' in /home/stpcomm/public_html/roundtablelearning/system/user/addons/seo_lite/views/index.php on line 42

The Add-on seems to run fine otherwise, But I would like to tweak it a bit.

Odd thing is, I have this running on a different site - same EE version - and DON’T get the error.

I have tried uninstalling & re installing with no luck.

I looked at the line of code the error references & it is this line…

<?=form_open($save_settings_url, ['class' => 'settings'])?>

Has anyone experienced this?

Thanks. Russ

       
FountainInternet's avatar
FountainInternet
53 posts
9 years ago
FountainInternet's avatar FountainInternet

If your version of PHP is less than 5.4, and short tags (<? … ?>) are disabled, this could be the reason. See here for an explanation and here for how to switch short tags back on again (the tag in question <?= is actually called the short echo tag).

       
Russ K.'s avatar
Russ K.
114 posts
9 years ago
Russ K.'s avatar Russ K.

I saw that, & I tried changing the short tag to a <?php tag, but it didn’t have an effect. shouldn’t it have if that is the issue?

R

       
FountainInternet's avatar
FountainInternet
53 posts
9 years ago
FountainInternet's avatar FountainInternet

Assuming you changed all of the <?= to <?php echo then yes. However, I’ve just noticed that line 42 of the file you mentioned has an array that uses the short syntax:

['class' => 'settings']

Short syntax arrays were introduced in PHP 5.4, so if your version of PHP is older than that you’ll need to convert short syntax arrays to standard syntax, e.g.

array('class' => 'settings')

Better still, if you’re on an older version of PHP then you should upgrade, because versions of PHP <5.5 are no longer supported.

       
Russ K.'s avatar
Russ K.
114 posts
9 years ago
Russ K.'s avatar Russ K.

Thanks for the reply… I have noticed that the difference in the 2 installations I’m running of EE is the PHP version… the one that works as expected is on > 5.4 so I’m looking at the upgrade for the other installation, but I need to review my other sites to make sure they are all using newer frameworks (as I think they do) that support it.

Thanks again.

R

       
Russ K.'s avatar
Russ K.
114 posts
9 years ago
Russ K.'s avatar Russ K.

I got all my server upgrades in & it did fix the issue.

Thanks.

R

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.