Upgrade error?

UWX Administrator Posted in Technical Support 9 years ago

exception 'OssnDatabaseException' with message 'Unknown column 'premission' in 'ossnentities' ALTER TABLE ossn_entities CHANGE premission permission INT( 1 ) NOT NULL ; ' in /xxx/xxx/xxx/xxx/classes/OssnDatabase.php:76 Stack trace: #0 /xxx/xxx/xxx/xxx/upgrade/upgrades/1423419053.php(20): OssnDatabase->execute() #1 /xxx/xxx/xxx/xxx/libraries/ossn.lib.upgrade.php(82): includeonce('/xxx/xxx/xxx/xxx....') #2 /xxx/xxx/xxx/xxx/upgrade/upgrade.php(14): ossntriggerupgrades() #3 {main}

This was an attempt to upgrade from 2.1 to advertised (in dashboard) 2.2, any ideas? Or is this a misspelling of 'permission' in the code? This IS the latest downloadable file.

Replies
German Luzi Fahell Replied 9 years ago

Thank you ever so much, UWX.
You're naming my problems by chapter and word.

us UWX Administrator Replied 9 years ago

Exactly right, the graphics were being cached, and were overwritten. This includes changes made to the default theme itself as they did not survive the upgrade.

However, I find extreme lack of documentation for customizing OSSN, both with images/graphics and "modules/components" to make the site(s) more user compatible. While developers and users of the platform from the start may know exactly how it works, others new to it have no clue, nor where to start. For being an "open" platform where modification for use is encouraged, why not provide the means via dashboard for such trivial customizations? Such changes made could then be written to an admin "modification/theme" file separate from the platform core by the system, and survive normal upgrading. The modifications folder could be written to the server root, like the /ossn_data folder is required to be.

This makes more practical sense than having users modify the system itself, or theme files contributed overall. Requiring users of the platform to make their own "theme", when they have no idea of how to do it, nor the documentation of how, would seem to discourage use of the platform to many.

German Michael Zülsdorff Replied 9 years ago

Hmm, doesn't make too much sense to me since everything gets overwritten when unpacking the zip archives - as long as you are not using your own theme located in a different subdirectory.
Are you sure your graphics are not beeing cached?

Anyway, it would be a good idea to make all customizable items part of the themes instead of holding them in the core system.
(see https://github.com/opensource-socialnetwork/opensource-socialnetwork/issues/281)

us UWX Administrator Replied 9 years ago

Thank you for the replies. After 2nd attempt everything went as normal and dashboard reports version 2.2, I suspect that a file(s) became corrupt during overwrite or transfer.

On a side note, customized branding graphics persisted as they were renamed to match originals. However, footer customization was overwritten back to original code during upgrade.

German Michael Zülsdorff Replied 9 years ago

Ooops yes: Arsalan was faster. My answer has become obsolete. :)

German Michael Zülsdorff Replied 9 years ago

In fact the referred column was initially named "premission", and part of the upgrade procedure was to rename it to "permission" (according to some code changes)

This looks like renaming has been done already and the upgrade script is attempting to do it twice.

Basically: If your db is up-to-date (and it seems it is) and you've unzipped the latest Ossn archive, your site should be okay. Nevertheless it's of course worth some investigation what is making the upgrade script running out of sync.

Perhaps you do remember the exact sequence of your changes and you can tell us step by step what you did?

Indonesian Arsalan Shah Replied 9 years ago

It has been fixed in v2.3. If you installed v2.1 then you don't have to worry about upgrade. as v2.2 didn't have any database update files.

You can try v2.3 development:

https://github.com/opensource-socialnetwork/opensource-socialnetwork