Upgrade proces from Newscoop 3.5.5 to 4.2.4 fail - SOLVED
  • Hi!
    We plan to move old site (newscoop 3.5.5) to a new server with fresh newscoop install (4.2.4) over the weekend.
    Installation went without problems.
    Newscoop 4.2.4. seems to work OK.

    Then we try to restore Newscoop 3.5.5. backup from our production site.

    There are problem with non existient table:
    *********
    PHP Fatal error:  Uncaught exception 'PDOException' with message
    'SQLSTATE[42S02]: Base table or view not found: 1146 Table
    'novice.Versions' doesn't exist' in
    /var/www/vhosts/beta.site.si/newscoop/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:758
    **********

    What is the right way to update newscoop 3.5.5. to the actual  version?

    I would be very grateful for the quick help
    Thanks
    Robert
    p.s. updated on 4.11.2014

    Maybe someone will help my notes on Upgrade:
    Migration from old server with 3.x.x to new server with Newscoop 4.2.4 (on Ubuntu 14.04) step by step

    1. Install Newscoop 4.2.4 to a new server
    (via secure apt, because automatic updates and package dependencies)
    (http://sourcefabric.booktype.pro/newscoop-42-for-journalists-and-editors/installation-on-debianubuntu/)
    2. Test new install if works OK
    3. Instal Newscoop 3.5.5 on new server.
    (use instalation from SF http://sourceforge.net/projects/newscoop/files/3.5.5/)
    4. Make backup of 3.x.x on old server
    5. Restore backup on fresh 3.5.5 install
    6. Test if it works OK
    7. Make backup of 3.5.5
    8. Delete 3.5.5. and install Newscoop 4.1.2 on new server.
    (use instalation from SF http://sourceforge.net/projects/newscoop/files/4.1.2/)
    Not from Github!!!!
    9. Restore backup from newscoop 3.5.5
    10. Log in as Administrator and go to Content > publication> Configuration and redefine SEO
    11. Go to menu Plugins> manage plugins> enable all plugins
    12. Test if everithing works OK
    13. Make backup of newscoop 4.1.2.
    14. Delete 4.1.2 and install Newscoop 4.2.4 on new server.
    ( from https://github.com/sourcefabric/Newscoop/releases/tag/4.2.4)
    15. Restore backup from Newscoop 4.2.1
    16. Test if everithing works OK
    Post edited by RobertB at 2014-11-04 16:25:38
  • 13 Comments sorted by
  • Vote Up1Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    first upgrade 3.5.x. to 4.1.x. After you can upgrade to 4.2.4
  • Vote Up1Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    try this:

    go to publication, open configuration and redefine SEO.
    See screenshot: http://take.ms/Djm1y

  • Vote Up1Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    2. I dont have this option to choose... Only Single-line Text or Multi-line Text with WYSIWYG

    3. How to add it?

    all types are available for new field only. Exiting fields are not compatible with all other types. It depends on data type.


    4. Is it possible to reassign a field type Multi-line Text with WYSIWYG to Multi-line Text?

    Click on "Multi-line Text with WYSIWYG" and choose Multi-line Text.
  • Hi Andrey!

    Update from 3.5.5 to 4.1.2 goes OK.
    But then there are errors in the administration interface. When I try to open one of my articles, an error occurs:
    ***********
    Newscoop has encountered a problem.

    Please take a minute to send us an email.

    Simply copy and paste the error report below and send it to: newscoop-bug@sourcefabric.org.

    Thank you.

    Error Report
    Error ID:     4096:Newscoop:4.1.2:Article.php:1696
    Error String:     Argument 1 passed to Article::getSEOURLEnd() must be of the type array, boolean given, called in /var/www/vhosts/beta.site.si/newscoop-4.1.2/admin-files/articles/edit_html.php on line 62 and defined
    Time:     Thu, 30 Oct 2014 18:58:35 +0100
    Backtrace:    

    Admin_Bootstrap::{closure}() called at [/var/www/vhosts/beta.site.si/newscoop-4.1.2/classes/Article.php:1696]
    Article::getSEOURLEnd() called at [/var/www/vhosts/beta.site.si/newscoop-4.1.2/admin-files/articles/edit_html.php:62]
    include_once() called at [/var/www/vhosts/beta.site.si/newscoop-4.1.2/admin-files/articles/edit.php:264]
    require_once() called at [/var/www/vhosts/beta.site.si/newscoop-4.1.2/application/modules/admin/controllers/LegacyController.php:129]
    Admin_LegacyController::indexAction() called at [/var/www/vhosts/beta.site.si/newscoop-4.1.2/vendor/bombayworks/zendframework1/library/Zend/Controller/Action.php:516]
    Zend_Controller_Action::dispatch() called at [/var/www/vhosts/beta.site.si/newscoop-4.1.2/vendor/bombayworks/zendframework1/library/Zend/Controller/Dispatcher/Standard.php:295]
    Zend_Controller_Dispatcher_Standard::dispatch() called at [/var/www/vhosts/beta.site.si/newscoop-4.1.2/vendor/bombayworks/zendframework1/library/Zend/Controller/Front.php:954]
    Zend_Controller_Front::dispatch() called at [/var/www/vhosts/beta.site.si/newscoop-4.1.2/vendor/bombayworks/zendframework1/library/Zend/Application/Bootstrap/Bootstrap.php:97]
    Zend_Application_Bootstrap_Bootstrap::run() called at [/var/www/vhosts/beta.site.si/newscoop-4.1.2/vendor/bombayworks/zendframework1/library/Zend/Application.php:366]
    Zend_Application::run() called at [/var/www/vhosts/beta.site.si/newscoop-4.1.2/public/index.php:5]
    require_once() called at [/var/www/vhosts/beta.site.si/newscoop-4.1.2/admin.php:4]

    *************

    Upgrade was OK
    *************
    Newscoop Restore Utility
    ------------------------
     * Initializing...
           * Temp directory: /var/www/vhosts/beta.site.si/newscoop-4.1.2/backup/backup-campsite-2014-10-29-22-50-18
       * Initialization done.
     * Extracting files into temp directory...done.
     * Backup database name is 'novice'.
     * Destination database name (to be replaced) is 'novice'.

     All files in the following directories will be deleted.
     (The backup files will be copied to these locations)
        /var/www/vhosts/beta.site.si/newscoop-4.1.2/themes
        /var/www/vhosts/beta.site.si/newscoop-4.1.2/images
        /var/www/vhosts/beta.site.si/newscoop-4.1.2/files
        /var/www/vhosts/beta.site.si/newscoop-4.1.2/cache
        /var/www/vhosts/beta.site.si/newscoop-4.1.2/pdf
     Are you sure you want to continue? (y/N) y
     * Removing files in /var/www/vhosts/beta.site.si/newscoop-4.1.2/themes...done.
     * Removing files in /var/www/vhosts/beta.site.si/newscoop-4.1.2/images...done.
     * Removing files in /var/www/vhosts/beta.site.si/newscoop-4.1.2/files...done.
     * Removing files in /var/www/vhosts/beta.site.si/newscoop-4.1.2/cache...done.
     * Removing files in /var/www/vhosts/beta.site.si/newscoop-4.1.2/pdf...done.
     * Restoring templates...done.
     * Restoring themes...done.
     * Restoring images...done.
     * Restoring file attachments...done.
    done.
     * Restoring the database novice...done.
     * Upgrading (if necessary)...
    * Upgrading the database from version 3.5.x...
    <pre>    * importing database roll 3.5.x / .</pre>
    No 'Versions' table in the database novice
    <pre>    * importing database roll 3.5.x / 2012-03-12</pre>

    <pre>    * importing database roll 3.5.x / 2012-05-16</pre>

    <pre>    * importing database roll 4.0.x / 2012-05-23</pre>

    <pre>    * importing database roll 4.0.x / 2012-06-05</pre>

    <pre>    * importing database roll 4.0.x / 2012-06-29</pre>

    <pre>    * importing database roll 4.0.x / 2012-09-10</pre>

    <pre>    * importing database roll 4.0.x / 2012-09-20</pre>

    <pre>    * importing database roll 4.0.x / 2012-11-23</pre>

    <pre>    * importing database roll 4.0.x / 2012-12-18</pre>

    <pre>    * importing database roll 4.0.x / 2012-12-28</pre>

    <pre>    * importing database roll 4.1.x / 2013-01-14</pre>

    <pre>    * importing database roll 4.1.x / 2013-01-23</pre>

    <pre>    * importing database roll 4.1.x / 2013-04-12</pre>

    <pre>    * importing database roll 4.1.x / 2013-04-22</pre>
    done.
     * Upgrading templates...done.
     * Updating plugins (if necessary)...   done.
     * Cleaning up...done.

    IMPORTANT!
    You must restart the apache server for the changes to take effect!
    ************
    Thanks for help
    Robert
  • Thanks Andrey!
    It works!
    Thank you very much!
    Peacefull night!
    Robert
  • Hi Andrey!
    Two additional questions:
    1. Is it possible to apply theme (templates) from 3.5.5 to 4.x?
    2. For intro or deck article type field we would like to have a Multi-line Text without WYSIWYG? Is this possible and some way?
    Thanks for help!
    Robert
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    1. After upgrading to 4.1.x you can find new folder: themes
    There are some predefined themes and upgraded theme based on templates from prev. version. You can play with this theme but usually templates need to be refactored to be suitable for 4.2.x

    2. See screenshot: http://take.ms/frv1Q
  • 1. Ok, I make new template...

    2. I dont have this option to choose... Only Single-line Text or Multi-line Text with WYSIWYG

    3. How to add it?

    4. Is it possible to reassign a field type Multi-line Text with WYSIWYG to Multi-line Text?

    Thanks!
    Robert
  • HI Andrey,
    tonight we try to make final step - upgrade from newscoop 4.1.2. to 4.2.4
    but encountered errors when upgrading database:

    **************
    <pre> * importing database roll 4.2.x / 2013.05.06</pre>
    PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'novice.plugin_debate_vote' doesn't exist' in /var/www/vhosts/beta.site.si/newscoop-4.2.4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:633

    **************
    We not use debate plugin in 3.3.5 and 4.1.2....
    Any advice?
    Thanks for your help!
    Robert

    **************************************
    Newscoop Restore Utility
    ------------------------
     * Initializing...
       * Temp directory: /var/www/vhosts/beta.site.si/newscoop-4.2.4/backup/backup-newscoop-2014-11-03-21-40-38
       * Initialization done.
     * Extracting files into temp directory...done.
     * Backup database name is 'novice'.
     * Destination database name (to be replaced) is 'novice'.
     * Removing files in /var/www/vhosts/beta.site.si/newscoop-4.2.4/conf/..//themes...done.
     * Removing files in /var/www/vhosts/beta.site.si/newscoop-4.2.4/conf/..//images...done.
     * Removing files in /var/www/vhosts/beta.site.si/newscoop-4.2.4/conf/..//public/files...done.
     * Removing files in /var/www/vhosts/beta.site.si/newscoop-4.2.4/conf/..//cache...done.
     * Removing files in /var/www/vhosts/beta.site.si/newscoop-4.2.4/conf/..//public/pdf...done.
     * Removing files in /var/www/vhosts/beta.site.si/newscoop-4.2.4/conf/..//public/videos...done.
     * Restoring themes...done.
     * Restoring images...done.
     * Restoring videos...done.
     * Restoring file attachments... * Restoring PDFs...done.
    done.
     * Restoring the database novice... done.
     * Upgrading (if necessary)...
    * Upgrading the database from version 4.1.x, roll 2013-04-22...
    <pre> * importing database roll 4.2.x / 2013-02-19</pre>

    <pre> * importing database roll 4.2.x / 2013.03.06</pre>

    <pre> * importing database roll 4.2.x / 2013.05.06</pre>
    PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'novice.plugin_debate_vote' doesn't exist' in /var/www/vhosts/beta.site.si/newscoop-4.2.4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:633
    Stack trace:
    #0 /var/www/vhosts/beta.site.si/newscoop-4.2.4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(633): PDO->query('ALTER TABLE `pl...')
    #1 /var/www/vhosts/beta.site.si/newscoop-4.2.4/library/Newscoop/Doctrine/AdoDbAdapter.php(66): Doctrine\DBAL\Connection->executeQuery('ALTER TABLE `pl...', Array)
    #2 /var/www/vhosts/beta.site.si/newscoop-4.2.4/bin/cli_script_lib.php(1257): Newscoop\Doctrine\AdoDbAdapter->execute('ALTER TABLE `pl...')
    #3 /var/www/vhosts/beta.site.si/newscoop-4.2.4/bin/cli_script_lib.php(545): camp_import_dbfile('localhost:3306', 'novice', 'mypass', 'novice', '/var/www/vhosts...', Array)
    #4 /var/www/vhosts/beta.site.si/newscoop-4.2.4/bin/newscoop-restore(565): camp_upgrade_database('novice')
    #5 {main}
      t in /var/www/vhosts/beta.site.si/newscoop-4.2.4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php on line 633
    PHP Warning:  session_destroy(): Trying to destroy uninitialized session in /var/www/vhosts/beta.site.si/newscoop-4.2.4/bin/newscoop_bootstrap.php on line 74
    root@ip183:/var/www/vhosts/beta.site.si/newscoop/bin#
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    It's a known issue. You need to enable debate plugin before upgrade to 4.2.4
  • Thanks Andrey! I will try...

    I have also problem with importing themes. When I import theme (theme-NewCustodian-master)
    newscoop 4.2.4 says OK, but a theme does not appear on a list...

    I try also on Sourcefabric demo - the situation is the same... a newely uploaded theme does not appear on a list..
    Thanks for help
    Robert
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    about theme. It's a problem of wrong zip file. You need to extract manually the files from zip into themes/unassigned folder.
  • Andrey, it works!
    Thanks for all your help and advice.
    And all team for great software!

    Peaceful night!


    Robert