Menu

Update 4.1.9 to 4.2.1: Database error when viewing resource

Help
Geoemyda
2013-11-10
2013-11-12
  • Geoemyda

    Geoemyda - 2013-11-10

    Hello,

    I have updated my 4.1.9 version to 4.2.1 today by uploading the new files to my folder. I got a message to log in as admin to perform the database update. I did not receive any error message during the database update. Wikindx forwarded me to the front page and everything looks normal.

    But when I try to view a ressource
    /index.php?action=resource_RESOURCEVIEW_CORE&id=1
    I get a database error:

    Unable to read database.
    SELECT resourceId, resourceType, resourceTitle, resourceSubtitle, resourceShortTitle, resourceTitleSort, resourceTransTitle, resourceTransSubtitle, resourceTransShortTitle, resourceField1, resourceField2, resourceField3, resourceField4, resourceField5, resourceField6, resourceField7, resourceField8, resourceField9, resourceNoSort, resourceTransNoSort, resourceIsbn, resourceBibtexKey, resourceDoi, resourcepageId, resourcepagePageStart, resourcepagePageEnd, resourceyearId, resourceyearYear1, resourceyearYear2, resourceyearYear3, resourceyearYear4, resourcemiscId, resourcemiscCollection, resourcemiscPublisher, resourcemiscField1, resourcemiscField2, resourcemiscField3, resourcemiscField4, resourcemiscField5, resourcemiscField6, resourcemiscTag, resourcemiscAddUserIdResource, resourcemiscEditUserIdResource, resourcemiscAccesses, resourcemiscMaturityIndex, resourcemiscPeerReviewed, resourcemiscQuarantine, resourcemiscAccessesPeriod, resourcesummaryId, resourcesummaryQuotes, resourcesummaryParaphrases, resourcesummaryMusings, resourcetextId, resourcetextNote, resourcetextAbstract, resourcetextUrls, resourcetextUrlText, resourcetextEditUserIdNote, resourcetextAddUserIdNote, resourcetextEditUserIdAbstract, resourcetextAddUserIdAbstract, resourcetimestampId, resourcetimestampTimestamp, resourcetimestampTimestampAdd, usersId, usersUsername, usersFullname, collectionId, collectionTitle, collectionTitleShort, collectionType, publisherId, publisherName, publisherLocation, publisherType FROM (SELECT DISTINCT resourceId, resourceType, resourceTitle, resourceSubtitle, resourceShortTitle, resourceTitleSort, resourceTransTitle, resourceTransSubtitle, resourceTransShortTitle, resourceField1, resourceField2, resourceField3, resourceField4, resourceField5, resourceField6, resourceField7, resourceField8, resourceField9, resourceNoSort, resourceTransNoSort, resourceIsbn, resourceBibtexKey, resourceDoi, resourcecreatorCreatorSurname AS creatorSurname, resourcecreatorResourceId FROM WKX_resource LEFT JOIN WKX_resource_creator ON resourcecreatorResourceId = resourceId WHERE (resourceId = '851')) AS WKX_t1 LEFT JOIN WKX_resource_text ON resourcetextId = resourceId LEFT JOIN WKX_resource_misc ON resourcemiscId = resourceId LEFT JOIN WKX_resource_year ON resourceyearId = resourceId LEFT JOIN WKX_resource_page ON resourcepageId = resourceId LEFT JOIN WKX_resource_timestamp ON resourcetimestampId = resourceId LEFT JOIN WKX_resource_summary ON resourcesummaryId = resourceId LEFT JOIN WKX_publisher ON publisherId = resourcemiscPublisher LEFT JOIN WKX_collection ON collectionId = resourcemiscCollection LEFT JOIN WKX_users ON usersId = CASE WHEN (resourcemiscEditUserIdResource IS NOT NULL) THEN (resourcemiscEditUserIdResource) ELSE (resourcemiscAddUserIdResource) END GROUP BY resourceId

    --> ('WKX_t1.resourceType' isn't in GROUP BY)

    What is wrong here and how can I fix it?

    Thank you for any suggestion!

     
  • Geoemyda

    Geoemyda - 2013-11-11

    I should add, that the SQL request works when I copy it to phpMyAdmin. I do not receive any error messages there.

     
  • Mark Grimshaw

    Mark Grimshaw - 2013-11-11

    Hi Geoemyda.

    Well, that's very strange. If you're using the same MySQL server for both the wikindx and for phpMyAdmin, then the same query should either work on both or not.

    I'm also little puzzled why, using this:
    /index.php?action=resource_RESOURCEVIEW_CORE&id=1

    the SQL is pulling resourceId 851.

    Do you get the same errors with other resource IDs?

    Mark

     
  • Geoemyda

    Geoemyda - 2013-11-12

    Hello Mark,
    thank you for your quick reply.

    I am sorry for the confusion with the ids, this was just a copy and paste error.

    My installation is working now, but I do not know what was the problem. I copied the database to another wikindx installation and there it did work. Then I tried to use a different database with the wikindx-installation which did not work. So finally I uploaded all files again. Perhaps the php-file was somehow damaged.

     
  • Mark Grimshaw

    Mark Grimshaw - 2013-11-12

    Glad to hear it's working but difficult to think what the problem was. Perhaps there was something damaged or missing during the upgrade of the PHP files.

    Regards,

    Mark

     

Log in to post a comment.