Bug 27158 - software error
Summary: software error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: 20.11
Hardware: All Linux
: P5 - low major (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-04 19:56 UTC by Nishath Ahmed
Modified: 2021-12-13 21:08 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Koha-sys-info (108.75 KB, image/png)
2020-12-10 12:45 UTC, Nishath Ahmed
Details
Koha-shelves-info (209.87 KB, image/png)
2020-12-10 13:12 UTC, Nishath Ahmed
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nishath Ahmed 2020-12-04 19:56:50 UTC
Hi THere,
In the given link on OPAC (i.e.) your list
http://localhost/cgi-bin/koha/opac-shelves.pl?op=list&category=1

when I click I get following error
Software error:

DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column 'me.created_on' in 'field list' at /usr/share/perl5/Data/Page.pm line 49

For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error. 

Please help me out. Thanks!
Comment 1 Jonathan Druart 2020-12-09 12:54:40 UTC
Which exact version of Koha are you using, 20.11.00?
How did you install it? Did you upgrade from a previous version of Koha?
Did you restart the different services?

% sudo service apache2 restart
% sudo service koha-common restart
Comment 2 Nishath Ahmed 2020-12-10 12:45:52 UTC
Created attachment 114305 [details]
Koha-sys-info

Dear Jonathan Druart ,
I tried everything and dropped a bug here. I have attached system information for your reference.

Regards!
Nishath
Comment 3 Jonathan Druart 2020-12-10 12:53:29 UTC
Does the column virtualshelves.created_on exist in DB?

% koha-mysql $INSTANCE
MariaDB > desc virtualshelves;

You should see:
| created_on               | datetime     | NO   |     | NULL                ||
Comment 4 Nishath Ahmed 2020-12-10 13:12:01 UTC
Created attachment 114307 [details]
Koha-shelves-info

cgi-bin/koha/opac-shelves.pl
Comment 5 Jonathan Druart 2020-12-10 13:19:55 UTC
So you don't have the column. That's very weird, it has been added by 3.19.00.038, so a long time ago.

From which Koha version did you upgrade?

You can try the two following queries, to add the missing column, but you should have seen an error during the upgrade.
ALTER TABLE virtualshelves
ADD COLUMN created_on DATETIME NOT NULL AFTER lastmodified;

UPDATE virtualshelves
SET created_on = lastmodified, lastmodified = lastmodified;
Comment 6 Nishath Ahmed 2020-12-11 12:18:48 UTC
Jonathan Druart,
Got it! Thanks for your kind help. By the way why it wasn't altered during upgrade I mean (upgrade-database-schema) command. 

Anyways many thanks!

Regards!