Update 2011 version to 2019_2 version

SimpleInvoices Group Forum Forums Fearless359 SimpleInvoices Discussion Group Update 2011 version to 2019_2 version

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #1422
    radiocampustours
    Participant

    Hi,
    I had a php 5.6 and as I have updated my server to php 7.4 the 2011 version does not work anymore. I have made a backup then I have uploaded the 2019_2 version to the folder where the 2011 version was. I have tried to update the db and I have this error.

    Fatal error: Uncaught Error: Class ‘db’ not found in /home/clients/ea27f7cbee09d7101a32496af37c62cf/web/facturier/modules/options/database_sqlpatches.php:14 Stack trace: #0 /home/clients/ea27f7cbee09d7101a32496af37c62cf/web/facturier/include/sql_patches.php(554): getNumberOfDonePatches() #1 /home/clients/ea27f7cbee09d7101a32496af37c62cf/web/facturier/modules/options/database_sqlpatches.php(6): include(‘/home/clients/e…’) #2 /home/clients/ea27f7cbee09d7101a32496af37c62cf/web/facturier/index.php(375): include(‘/home/clients/e…’) #3 {main} thrown in /home/clients/ea27f7cbee09d7101a32496af37c62cf/web/facturier/modules/options/database_sqlpatches.php on line 14

    I do not really understand where is my bug and what should i have to do ?

    Is it possible to update this really old (2011) version to a new one (2019_2) ?

    A bit help is needed

    Regards,

    Stéphane
    Radio Campus Tours

    #1423
    RRowley
    Participant

    The error you are getting doesn’t appear to come from the master_2019.2 load. I believe that you loaded the master version which isn’t supported. Use this link to get the master_2019.2 version: Master 2019.2 Zip File.

    You should restore your database and clear out all file from the previous download. Be sure to keep your config/config.php and config/custom.config.php files from before the previous load.

    #1425
    radiocampustours
    Participant

    Hi,

    I have followed your tip. I have downloaded the two files related to config. I have deleted the files that were on the server. I have downloaded the folder you have linked to your post. I have deleted the old db and reloaded it. I have uploaded all of the new files + the files regarding to config. I can see the page related to the patches.

    I have enclosed a text file with my patches list. Till patch 254, everything seems to be ok. I have clicked on the update button then an error has appeared.

    SqlPatchManager::runSqlPatch() error. See error log for more information.

    I am on a shared hosting and I guess I can not access to the error log or i d not know where to find it.

    What should it be done to end that update please ?

    Regards

    Stéphane
    Radio Campus Tours

    #1434
    radiocampustours
    Participant

    Hi,
    I ve found the php.log which I enclose. Sorry I do not undertsand what does it mean and what should I have to do ? A bit help is needed please.
    Regards
    Stéphane

    Attachments:
    #1438
    RRowley
    Participant

    I assume the error displayed in your browser is:

    SqlPatchManager::runSqlPatch() - PdoDb - query(): Execute error. See error_log.

    In the php.log, it is attempting to create the si_products_attributes table but this table already exists.

    This update would only happen if the last row in the si_sql_patchmanager table has a sql_patch_ref value less than 255 but the si_products_attributes table already exists.

    This inconsistency suggest your database is in an unknown state.

    To remedy this, you should restore both database and SI version to what you had running correctly for SI 2011 at the time you upgraded to PHP 7.4. After doing this, check out the content of the si_sql_patchmanager table and verify that the greatest sql_patch_ref value is less than 255. Also verify that there is no si_products_attributes table.

    If both these assertions are true, then access the master_2019.2 code that you have loaded on your system.

    Hopefully this will run correctly. Let me know either way.

    #1439
    RRowley
    Participant

    HERE IS A REVISION OF MY PREVIOUS POST. I ATTEMPTED TO EDIT IT BUT WAS TOO LATE. SO IGNORE IT AND READ THIS

    I assume the error displayed in your browser is:

    SqlPatchManager::runSqlPatch() - PdoDb - query(): Execute error. See error_log.

    In the php.log, it is attempting to create the si_products_attributes table but this table already exists.

    This update would only happen if the greatest value of the sql_patch_ref column in the si_sql_patchmanager table has a value less than 255 and if the si_products_attributes table already exists.

    This inconsistency suggest your database is in an unknown state.

    To remedy this, you should DROP all tables from the database and then Import the database running for SI 2011 at the time you upgraded to PHP 7.4.

    After doing this, check out the content of the si_sql_patchmanager table and verify that the greatest sql_patch_ref value is less than 255 and that there is no si_products_attributes table. Or, that the greatest sql_patch_ref value is greater than or equal to 255 and the si_products_attributes table exists.

    If one of these assertions is true, you can access the master_2019.2 code that you have loaded on your system and hopefully this will run correctly. Let me know if this is the case.

    However, if neither of these assertions is true, do not run anything, report that here and we’ll work on it further.

    • This reply was modified 3 years, 8 months ago by RRowley.
    #1443
    radiocampustours
    Participant

    Hi,
    I have dropped the db and I have imported the dump which worked for SI 2011. It shows that the greatest sql_patch_ref value is less than 255 (251) but I have a table named si_products_attributes.
    What should I have to do please ?
    Regards,
    Stéphane

    #1444
    RRowley
    Participant

    Export the structure of you database, zip it and attach to a response to this topic. I need to determine if their might be other inconsistencies with what the patch process is expecting.

    #1445
    radiocampustours
    Participant

    Hi,
    Please find the sql zipped file with the structure of the db.
    Regards,
    Stéphane

    Attachments:
    #1451
    fearless359
    Keymaster

    For some reason, this text box didn’t like my long instructions. So I put them in the attached file. Download the attached zip file, and read the FixInstructsions.txt file in it.

    #1453
    radiocampustours
    Participant

    Hi,
    Many thanks ! It works with SI master 2020.
    I only have four minor issues to get si master 2020 working perfectly.
    The first one is that the $ symbol is still used in the reports. Actually we use € symbol. What should I have to do to set € symbol everywhere ?
    The second one is that the default invoice template sets the bill summary on the left side. The biller are under this group of data. What should I have to do to define that I want the bill summary on the right and the biller on the left ? I mean on the same line.
    The third one is that not all of the words that are translated in the lang.php to french are used. What do I have to do please ?
    Then how should I define the bottom lines centered ?
    I have enclosed a bill in the zip file to explain my description.
    Regards

    Stéphane
    Radio Campus Tours

    Attachments:
    #1457
    radiocampustours
    Participant

    Hi,
    I enclose a quote as I would like to set the bill and the quote in SI master 2020.
    Regards
    Stéphane

    Attachments:
    #1459
    RRowley
    Participant

    No sure what you mean by “set the bill and the quote in SI master 2020. So you can elaborate on that.

    For reports, the currency code comes from the localCurrencyCode in the custom.config.ini file.

    Working with templates is a learn by doing exercise. Refer to the Invoice Templates & Styles topic on the left.

    There are two locations where the language is set. In the custom.config.ini, and in the Inv Prefs records. These control which language file is read. For instance, a setting of fr_FR uses language from the lang/fr_FR/lang.php file. My needs are simple. So I set all these values the same. Maybe you need to do this also.

    If I misunderstood the language issue, you might just need to translate the phrase in the lang file you want to use.

    #1460
    radiocampustours
    Participant

    Hi,

    I have succeeded in translating in french. Everything is good. Thanks for the tip.

    I am worth in creating the template of the invoice. I have tried to open the tpl file with a html editor. As I am changing a parameter the invoice is not generated. I do not really understand how to define a nice template. I am using now the cleverit template. It is almost ok but not perfect.

    Regards

    Stéphane

    #1462
    RRowley
    Participant

    Glad to hear it. It has been a tough upgrade road for you but success in the end will be worth it.

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.