EPrints Technical Mailing List Archive

Message: #03885


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Autocomplete broken after upgrade


Hi Jacob,

I have had a chance to test an upgrade from 3.3.12 to 3.3.13 and
Unfortunately, I cannot replicate the problem you are having.  However,
I did note an issue with the Javascript for the Debian package for
3.3.12, which has been subsequently fixed in 3.3.13.  However, if you
had made a local copy of this file
(/usr/share/eprints3/lib/static/javascript/auto/70_autocomplete.js) in
your archive then this local copy would override what the updated
version under /usr/share/eprints3/lib/ and may cause an issue with your
autocomplete fields.

One way to test whether this is an issue is to type the start of a
project name you know exists in you autocomplete file into the project
input field.  Do you very briefly see a box with a spinning icon? If so
scroll to the top of the page to see if you can see a box containing the
project you started to type in.  If not, if you could do the following
things:

run a "sudo updatedb" and then a locate 70_autocomplete.js and send me
the results of the locate.  Also
check /usr/share/eprints3/lib/static/javascript/auto/70_autocomplete.js
to make sure that on line 12 (or there about) says:

Element.clonePosition(element, $(target), {

rather than:

Position.clone(element, $(target), {

If there are any other occurrences of this file anyway other than this
check to make sure they have the former rather than latter line as well.

This became an issue because recent versions of PrototypeJS did not
support the Position.clone function call.  However, if you are upgrading
you should have versions of 20_prototype.js and 70_autocomplete.js that
are known to work together, unless you made a local copy of one of these
in your archive at some point in the past.

Regards

David Newman

On Fri, 2015-01-30 at 15:49 +0100, Jacob Wenzel wrote:
> Thanks a lot for the both of you.
> 
> No problem at all David, it is just a minor issue, actually I was
> pleased to find how easy the upgrade process went.
> 
> I forgot to mention my server is running Ubuntu x64 12.04 LTS.
> 
> This is all I see in the log Alan. I have replaced my actual
> repository ID with [repoid].
> 
> I have no idea where the reference to xxx-ru.com comes from, I suspect
> it is some kind of spammer.
> 
> error.log:
> ------------------------------------------------------------------
> ---------------- EPrints System Error ----------------------------
> ------------------------------------------------------------------
> Attempt to get value from not existent field: eprint/replacedby
> ------------------------------------------------------------------
>  at /usr/share/eprints3/perl_lib/EPrints/DataObj.pm line 702
> 
> EPrints::DataObj::get_value('EPrints::DataObj::EPrint=HASH(0x7f3dcd0dd780)', 'replacedby') called at /usr/share/eprints3/lib/plugins/EPrints/Plugin/Collection.pm line 113
> 
> EPrints::DataObj::EPrint::render('EPrints::DataObj::EPrint=HASH(0x7f3dcd0dd780)') called at /usr/share/eprints3/perl_lib/EPrints/DataObj/EPrint.pm line 1406
> 
> EPrints::DataObj::EPrint::generate_static('EPrints::DataObj::EPrint=HASH(0x7f3dcd0dd780)') called at /usr/share/eprints3/perl_lib/EPrints/Update/Abstract.pm line 66
> 
> EPrints::Update::Abstract::update('EPrints::Repository=HASH(0x7f3dc7d6ce80)', 'en', 499, '/archive/00/00/04/99') called at /usr/share/eprints3/perl_lib/EPrints/Apache/Rewrite.pm line 472
> 
> EPrints::Apache::Rewrite::handler('Apache2::RequestRec=SCALAR(0x7f3dc912af18)') called at -e line 0
>     eval {...} called at -e line 0
> [Fri Jan 30 15:09:12 2015] [error] [client 37.115.186.0]
> EPrints::abort()\n, referer: http://xxx-ru.com/
> DBD::mysql::st execute failed: Table '[repoid].subject_name_sortvalue'
> doesn't exist at /usr/share/eprints3/perl_lib/EPrints/Database.pm line
> 3211.
> SQL ERROR (execute): SELECT `subjectid`,`pos`,`name_sortvalue` FROM
> `subject_name_sortvalue` WHERE `subjectid` IN ('divisions')
> SQL ERROR (execute): Table '[repoid].subject_name_sortvalue' doesn't
> exist
> DBD::mysql::st fetchrow_array failed: fetch() without execute()
> at /usr/share/eprints3/perl_lib/EPrints/Database.pm line 2674.
> DBD::mysql::st execute failed: Table
> '[repoid].subject_sortvalue_sortvalue' doesn't exist
> at /usr/share/eprints3/perl_lib/EPrints/Database.pm line 3211.
> SQL ERROR (execute): SELECT `subjectid`,`pos`,`sortvalue_sortvalue`
> FROM `subject_sortvalue_sortvalue` WHERE `subjectid` IN ('divisions')
> SQL ERROR (execute): Table '[repoid].subject_sortvalue_sortvalue'
> doesn't exist
> DBD::mysql::st fetchrow_array failed: fetch() without execute()
> at /usr/share/eprints3/perl_lib/EPrints/Database.pm line 2674.
> DBD::mysql::st execute failed: Table '[repoid].subject_sortvalue_lang'
> doesn't exist at /usr/share/eprints3/perl_lib/EPrints/Database.pm line
> 3211.
> SQL ERROR (execute): SELECT `subjectid`,`pos`,`sortvalue_lang` FROM
> `subject_sortvalue_lang` WHERE `subjectid` IN ('divisions')
> SQL ERROR (execute): Table '[repoid].subject_sortvalue_lang' doesn't
> exist
> DBD::mysql::st fetchrow_array failed: fetch() without execute()
> at /usr/share/eprints3/perl_lib/EPrints/Database.pm line 2674.
> DBD::mysql::st execute failed: Unknown column
> 'subject__ordervalues_en.sortvalue_sortvalue' in 'order clause'
> at /usr/share/eprints3/perl_lib/EPrints/Database.pm line 3211.
> SQL ERROR (execute): SELECT `subject`.`subjectid` FROM `subject` LEFT
> JOIN `subject__ordervalues_en` ON
> `subject`.`subjectid`=`subject__ordervalues_en`.`subjectid` WHERE 1=1
> GROUP BY `subject`.`subjectid`,
> `subject__ordervalues_en`.`sortvalue_sortvalue`,
> `subject__ordervalues_en`.`name_name` ORDER BY
> `subject__ordervalues_en`.`sortvalue_sortvalue` ASC,
> `subject__ordervalues_en`.`name_name` ASC
> SQL ERROR (execute): Unknown column
> 'subject__ordervalues_en.sortvalue_sortvalue' in 'order clause'
> DBD::mysql::st fetch failed: fetch() without execute()
> at /usr/share/eprints3/perl_lib/EPrints/Search/Condition.pm line 588.
> 
> Thank you all again, have a nice weekend!!
> 
> On 30-01-2015 15:14, David R Newman wrote:
> 
> > Hi Jacob/Alan,
> > 
> > I will have a look into this as I have been sorting other issues with
> > the Debian package upgrade.  This means I have some VM snapshots I can
> > quickly swap between pre and post upgrade to see whether this breaks
> > during the upgrade.
> > 
> > Unfortunately, I probably won't have time to have a look before the
> > weekend but I should be able to sometime Monday/Tuesday next week.
> > 
> > Regards
> > 
> > David Newman
> > EPrints Services
> > 
> > 
> > On Fri, 2015-01-30 at 12:38 +0000, Alan.Stiles wrote:
> > > I would expect to see some errors in the httpd error_log if the autocomplete is failing - anything in there?
> > > 
> > > Alan
> > > 
> > > -----Original Message-----
> > > From: Jacob Wenzel [mailto:jw@energiakademiet.dk]
> > > Sent: 30 January 2015 10:39
> > > To: eprints-tech@ecs.soton.ac.uk
> > > Subject: [EP-tech] Autocomplete broken after upgrade
> > > 
> > > Hi guys!
> > > 
> > > I just did a successful upgrade from 3.3.12 --> 3.3.13 and most went smoothe.
> > > 
> > > However my simple autocomplete files for the "Projects" field, does not load anymore. I followed this guide, and I was working just fine before the upgrade:
> > > http://wiki.eprints.org/w/Autocompletion_and_Authority_Files_%28Romeo_Autocomplete%29
> > > 
> > > I just checked, and everything seems to look like it did before the upgrade.
> > > 
> > > I have already run bin/epadmin upgrade [repoid], and I have restartet apache and the indexer.
> > > 
> > > Help or pointers will be greatly appreciated, thank you in advance.
> > > 
> > > Have a nice weekend everyone!!
> > > 
> > > /Jacob
> > > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> > > *** Archive: http://www.eprints.org/tech.php/
> > > *** EPrints community wiki: http://wiki.eprints.org/
> > > *** EPrints developers Forum: http://forum.eprints.org/
> > > -- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority.
> > > 
> > > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> > > *** Archive: http://www.eprints.org/tech.php/
> > > *** EPrints community wiki: http://wiki.eprints.org/
> > > *** EPrints developers Forum: http://forum.eprints.org/
> > 
> > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> > *** Archive: http://www.eprints.org/tech.php/
> > *** EPrints community wiki: http://wiki.eprints.org/
> > *** EPrints developers Forum: http://forum.eprints.org/
> > 
> 
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/