Syntax Error - where to find this issue?

Permalink
Hi,

Hoping someone can help me out here? The vivd store add-on is on this sitehttp://www.neilaldredphotography.com.au... and when changes were being made to the stores groups and products the site went down and gives off a syntax error.

Now all access to the site is gone. How can I work out where the error is coming from? hoping I can go into the files/database and fix the issue....

Owner has not been keeping backups....

 
siton replied on at Permalink Reply
siton
Hi.

Add error screenshot, because Its impossible to know the problem without output information.

How? Go to -
System & Settings > Debug Settings
URL:
http://www.mysite.coml/index.php/dashboard/system/environment/debug

mark true this checkbox:
"Output error information to site users"


* Also, send message to vivid store support
* In general, daily backups is mandatory in sites!!!
Meje replied on at Permalink Reply
Thanks for the reply.

Vivid store support has disappeared. Haven't replied to support requests for around a year now.

I can't access the back end. This error is blocking all access to the site.
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi Meje,

The Vivid Store add-on appears to be abandoned.

There are several concrete5 ecommerce alternatives available depending on your skill level.
- If you are looking for a developer focused add-on, Community Store comes highly recommended.
https://github.com/concrete5-community-store...
- For non-developer options, there is a Snipcart add-on.
https://www.concrete5.org/marketplace/addons/ecommerce-with-snipcart...

There may also be a Shopify add-on in the marketplace in the near future.
Meje replied on at Permalink Reply
Thanks, and yes, definitely looking for alternatives!....but am at a stand still until I can gain access to the site again and uninstall.

Im happy at this point to just remove it for them, however Im not sure how I can do this without access to the dashboard?

I've tried deleting the files from within panel and dropping the tables from the database, but I must be missing something because it throws off more errors and still blocks access to the entire site.

Any tips on how to remove a problem package when you don't have access to uninstall in the dashboard?
MrKDilkington replied on at Permalink Reply
MrKDilkington
@Meje

Did you take a full backup (files and database) before deleting files and dropping tables?

If you took a backup, I highly recommend restoring it and then seeing if you can resolve the error first, so you can uninstall the add-on through the concrete5 dashboard.

Which files and tables did you delete? In general, deleting an add-on through SSH/FTP/web control panel file manager will create more issues if not done carefully, because concrete5 is still expecting the add-on files and table to be there.

If you don't have a backup, make one. After making a backup, you can try manually deleting the Vivid Store entry in the Packages table. This might give you access to the site again. If so, you will likely need to delete all the Vivid Store related attributes and single pages (deleted through the dashboard).

As a recommendation for future issues, in addition to making regular backups, always take a backup before making changes to a live server. This backup can then be used to "clone" the site locally. You would then experiment with fixing the issue on the local clone. This allows you to keep your live site safe.
Meje replied on at Permalink Reply
Thanks for the reply. Im just stepping in for a friend to help them resolve the issue and they don't have any backups.

Didn't delete any files, only moved them out of the public_html folder, and moved them back afterwards, and definitely took a backup of the database before changing anything in there. When it just threw another error I restored to the original error state.

Im pretty sure I tried removing the store from the packages table, but will go try again and see if it works.

Definitely prefer to resolve the issue and uninstall from dashboard....but willing to try removing it/disabling it or what ever I can do to get access and go from there if I can't do that.
Meje replied on at Permalink Reply
If I can just find where the error is coming from it would help - but its not giving any document name or line number.... Is there a way of finding out?
mnakalay replied on at Permalink Reply
mnakalay
you should put the files you deleted back so things are back to the first error and tell us what that error is. Maybe we could go from there.
Meje replied on at Permalink Reply 1 Attachment
It is all back. I put it back as soon as it didn't help the issue. The original error is the same as in the original post (link to the site). Ive included a screen shot here as well.
mnakalay replied on at Permalink Reply
mnakalay
Let's try something. Can you go to your directory application/config on the server and create file concrete.php.

Inside it put the following code
<?php
return array(
    'debug' => array(
        'detail' => 'debug',
        'display_errors' => true,
    ),
);

If it works we might be able to get a much more detailed error message.

Also, could you check what version of PHP you have on the server?
Gondwana replied on at Permalink Reply
Gondwana
That kinda looks like a php problem when trying to use array referencing with php 5.3 or earlier. Can you ascertain what version of php you're using (eg, via CPanel)?
mnakalay replied on at Permalink Reply
mnakalay
@Gondwana I agree it really looks like that. But I was wondering about it because C5's core also uses shorthand arrays and apparently the site was working so I have a doubt.

Nevertheless, it would be good to know just to make sure. I heard twice recently about hosts (*cough* Godaddy *cough*) that downgraded PHP without warning users first, so that could be an explanation.
Meje replied on at Permalink Reply
Thanks so much for your help - its much appreciated :)

Ok, so php version is 5.6.23

File created and site is showing info on the error :)

Looks like it an error with the gallery? I know that they were uploading images for the products being added and updated....
mnakalay replied on at Permalink Reply
mnakalay
ok so the PHP version is not the problem and on my install I don't have any problem with that gallery so my guess is the problem is somewhere else and the system is just getting it wrong.

Just to be sure,

in that gallery in the file packages/mylits_gallery_box/controller.php

does the uninstall function look like this:
public function uninstall()
    {
        parent::uninstall();
        $db = Database::connection();
        $table = [
         'btMylitsGalleryBox',
         'btMylitsGalleryBoxFiles',
         'btMylitsGalleryBoxSets',
         'MylitsGalleryBoxConfig',
      ];
        $db->Execute("DROP TABLE IF EXISTS " . implode(',', $table));
    }


Also don't leave the detailed debugging information on the site too long. It's not too safe. It's better to remove it for now and add it back if we need it later on.
NeilA replied on at Permalink Reply
Looks the same

public function uninstall()
    {
        parent::uninstall();
        $db = Database::connection();
        $table = [
         'btMylitsGalleryBox',
         'btMylitsGalleryBoxFiles',
         'btMylitsGalleryBoxSets',
         'MylitsGalleryBoxConfig',
      ];
        $db->Execute("DROP TABLE IF EXISTS " . implode(',', $table));
    }
    public function upgrade()
    {
        parent::upgrade();


Ive removed the debug file for now
Meje replied on at Permalink Reply
That me above :) forgot was logged into their account...
mnakalay replied on at Permalink Best Answer Reply
mnakalay
Could you replace
$table = [
         'btMylitsGalleryBox',
         'btMylitsGalleryBoxFiles',
         'btMylitsGalleryBoxSets',
         'MylitsGalleryBoxConfig',
      ];

with
$table = array(
         'btMylitsGalleryBox',
         'btMylitsGalleryBoxFiles',
         'btMylitsGalleryBoxSets',
         'MylitsGalleryBoxConfig',
      );

You'll most likely get a different error. We'll see what it is and can hope for something useful
Meje replied on at Permalink Reply
Sorry for the late reply!

I was actually about to try this suggestion....and surprise, surprise....there is now a working website!

Not sure if everything works yet... but I can now gain access.

Thank you for your time and help with this.
mnakalay replied on at Permalink Reply
mnakalay
Happy to hear that. Enjoy your site :)