Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QRCode Errors in v1.2.6.1 #667

Closed
adam820 opened this issue Mar 17, 2015 · 10 comments
Closed

QRCode Errors in v1.2.6.1 #667

adam820 opened this issue Mar 17, 2015 · 10 comments
Labels

Comments

@adam820
Copy link

adam820 commented Mar 17, 2015

Hello,

Since upgrading to v1.2.6.1, I'm noticing some issues with QR codes. On the asset page, the image is showing as broken. Trying to access the image directly returns:

ErrorException (E_UNKNOWN) 
imagecreate(): Invalid image dimensions
Open: /var/www/html/assets/vendor/dinesh/barcode/src/Dinesh/Barcode/DNS2D.php
        $this->setBarcode($code, $type);
        // calculate image size
        $width = ($this->barcode_array['num_cols'] * $w);
        $height = ($this->barcode_array['num_rows'] * $h);
        if (function_exists('imagecreate')) {
            // GD library
            $imagick = false;
           >>>>  $png = imagecreate($width, $height);
            $bgcol = imagecolorallocate($png, 255, 255, 255);
            imagecolortransparent($png, $bgcol);

Correlating with that, if I go into the settings page, and attempt to save (including not changing anything), I get the following:

Illuminate \ Database \ QueryException (42S22) 
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'barcode_type' in 'field list' (SQL: update `settings` set `updated_at` = 2015-03-17 15:40:03, `auto_increment_prefix` = , `barcode_type` = QRCODE where `id` = 1)

I don't actually have any logs in app/storage/logs to provide. If there's other information I can provide, let me know.

v1.2.6.1
Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 PHP/5.4.16

@snipe
Copy link
Owner

snipe commented Mar 17, 2015

Did you run composer install --no-dev when you upgraded?

@dbiers
Copy link

dbiers commented Mar 17, 2015

Looks like you have a missing column in your database. The composer update @snipe just mentioned will more than likely fix that. She does her homework.

@snipe
Copy link
Owner

snipe commented Mar 17, 2015

(Also looks like you forgot to run the migrations)

@snipe
Copy link
Owner

snipe commented Mar 17, 2015

@adam820 please see the upgrade instructions in the release notes for how to update composer and run migrations. https://github.com/snipe/snipe-it/releases/tag/v1.2.6.1

@snipe snipe added 🕙 waiting on OP 🚫 not a bug This issue is not a bug labels Mar 17, 2015
@adam820
Copy link
Author

adam820 commented Mar 17, 2015

No, not the --no-dev, just what's on the release page. Was --no-dev supposed to be part of it? Definitely did the normal upgrade steps; just to be sure, went back and did it again. No dice. The migration returns Nothing to migrate. and the QR codes are still broken.

@adam820
Copy link
Author

adam820 commented Mar 17, 2015

I don't know if it's related or not, but I was experiencing the 500 error in regards to the deleted assets. Re-seeded and then restored my other assets from a dump. The only modification to the dump was to remove the older seeded assets causing the error.

@snipe
Copy link
Owner

snipe commented Mar 18, 2015

You don't need --no-dev, it just means you skip loading the dev packages, which you won't need unless you're planning on developing on this package.

How did you restore from the dump? You may have messed up your migrations by doing that. The migration to add that field to the table definitely didn't run.

Can you show me the contents of your migrations table?

@snipe
Copy link
Owner

snipe commented Mar 25, 2015

Hi @adam820 - any updates on this?

@adam820
Copy link
Author

adam820 commented Apr 7, 2015

Hi, sorry, I was out for a week. I've managed to get this fixed. I left my DB in place, but pulled down a fresh copy of the release, and re-did the install/migration steps, which appears to have fixed the original issue. Should have done that to begin with.

sleepyhead

@adam820 adam820 closed this as completed Apr 7, 2015
@snipe
Copy link
Owner

snipe commented Apr 7, 2015

I know those feels.

yijvxeh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants