How can I update Datatables version under PHP?

How can I update Datatables version under PHP?

pkm2023pkm2023 Posts: 10Questions: 1Answers: 0

Hello forum,
I have the following problem in a customer project. The customer uses the PHP Library Datatables. Unfortunately in a very old version. Now we have to switch to PHP8 for compelling reasons. Now I would like to update the existing version of Datatables to PHP8 Ready.
What options are there?
Note: The customer uses the locally installed version. So no CDN...
Many, many thanks in advance..

Answers

  • allanallan Posts: 61,038Questions: 1Answers: 9,953 Site admin

    You can't CDN host PHP, so that isn't a concern. You can download the latest version of the Editor PHP libraries from the Editor download page, get them directly from GitHub, or from composer if you prefer.

    Allan

  • allanallan Posts: 61,038Questions: 1Answers: 9,953 Site admin

    If you need to update the client-side code for DataTables and it's extensions, you can do so from the download page.

    Allan

  • pkm2023pkm2023 Posts: 10Questions: 1Answers: 0

    Hello Allen,
    First of all, thank you very much for your answers. Unfortunately I can't get any further with this. But I also have to admit that I haven't had anything to do with the Datatables Libraries until now. The customer had it installed in 2016 and nothing has been changed since then. Now the customer has to upgrade to PHP 8.2 and now I have inherited this problem.
    1.
    A clean update to Datatables/Editor for PHP 8.2 does not work on the server side. CDN is not an option for the customer. It doesn't work with any solution, neither with the download from Editor download page, nor from Github, nor via Composer. What I noticed, however, is that the customer has a completely different folder and file structure under the Datatable folder in the old, currently installed version than in your new version.
    2.
    What do you mean by the update client-side? For me, client-side would be FrontEnd, i.e. browser.

    I would of course be very happy if you had one or two ideas for a possible solution to the problem.
    Best regards,
    Paulo.

  • kthorngrenkthorngren Posts: 19,925Questions: 26Answers: 4,698

    A clean update to Datatables/Editor for PHP 8.2 does not work on the server side.

    Do you get errors at the server or in the browser's console?

    Can you provide more details of what doesn't work?

    What I noticed, however, is that the customer has a completely different folder and file structure under the Datatable folder in the old, currently installed version than in your new version.

    Possibly you need to move the appropriate files to the old directory structure. Or the client HTML code will need to be updated to point to the new directory structure.

    What do you mean by the update client-side? For me, client-side would be FrontEnd, i.e. browser.

    Yes. The client side is the .js and .css code. You may need to update the client side HTML code with new paths/names. But it depends on what is currently defined.

    The specifics of what needs changed is determined by the currently solution and where the files are placed. Likely you can just replace the old files with the new. You should try this in a test environment first and also make a backup of the old versions.

    If upgrading from Editor 1.x to 2.x I believe a new license is needed.
    https://editor.datatables.net/purchase/index

    Kevin

  • pkm2023pkm2023 Posts: 10Questions: 1Answers: 0

    Hello Kevin,
    Thank you very much for your detailed information. I will check everything and answer your questions. Please be patient, unfortunately I can't do these things until tomorrow. Thanks.
    Many greetings Paulo.

  • pkm2023pkm2023 Posts: 10Questions: 1Answers: 0

    Hello Kevin,
    I spoke to the customer. I think he will buy the new license if necessary.
    Now about the errors that appear in the Bowser console. Danger! The old version of Datatables/Editor is currently still active. But PHP is already 8.2.
    I'm attaching the error messages as a screenshot.
    In advance, thank you again for your help.
    Best regards,
    Paulo

  • allanallan Posts: 61,038Questions: 1Answers: 9,953 Site admin

    Try updating to the 2.2.2 PHP libraries for Editor. They are open source under the MIT license and available here.

    I haven't tried them with Editor 1.x, but I'd expect them to work okay. The latest PHP code for Editor is tested with PHP 8.2.

    Allan

  • pkm2023pkm2023 Posts: 10Questions: 1Answers: 0

    Hello Allan,
    To be sure, I have to ask again. You recommend switching from 1.x (which the customer currently has) to 2.2.2. update! Did I understand this correctly?

  • allanallan Posts: 61,038Questions: 1Answers: 9,953 Site admin

    I'm saying that the 1.9.7 client-side Editor code should work with the 2.2.2 server-side code. I'm also noting that I haven't explicitly tested that scenario, so it is possible it might fail, but I would expect it to work.

    It is also worth me adding that Editor 1.x is no longer supported. So if your customer is willing to upgrade, then yes, I would recommend that.

    Allan

  • pkm2023pkm2023 Posts: 10Questions: 1Answers: 0

    Hello Allen,
    Thank you very much for your explanations.
    I think that if the customer is willing to upgrade, this is the best option. If we assume that we do this with the upgrade, in this case it is possible and sensible to remove the old server version 1.x or rename the directory and then add the new license/version 2.x completely clean to install?
    Then of course adapt the client-side code HTML etc. accordingly, paths etc?
    Then a question about the licenses at https://editor.datatables.net/purchase/index: Which license does the customer have to purchase? The single developer license (1), right?
    I would be happy to receive further feedback.
    Thank you and best regards,
    Paulo

  • allanallan Posts: 61,038Questions: 1Answers: 9,953 Site admin

    Hi Paulo,

    Yes, update the Editor CSS and JS files, and for the server-side update the PHP library files.

    If the customer has a license already get them to log into their account and then the Editor purchase page will show them upgrade pricing. If it is just yourself working on it, then yes, the single developer package would be correct.

    Allan

  • pkm2023pkm2023 Posts: 10Questions: 1Answers: 0

    Hello Allan,
    As already written, the customer wants to purchase the full version. He now has two more questions. It would be great if you could answer them so I can finally move forward. Thank you in advance.

    Question 1) You write that I can download the open source version 2.2.2. The customer now asks what is the difference between the free version and the purchasable version?
    Question 2) Apparently the customer wanted to buy in advance. But apparently his German credit card doesn't work. Apparently neither does PayPal. What could be the reason for this?
    Paulo...

  • allanallan Posts: 61,038Questions: 1Answers: 9,953 Site admin

    You write that I can download the open source version 2.2.2. The customer now asks what is the difference between the free version and the purchasable version?

    Not quite. The server-side libraries are open source. The Editor client-side libraries have a commercial license. There is no open source version of Editor on the client-side.

    Apparently the customer wanted to buy in advance. But apparently his German credit card doesn't work. Apparently neither does PayPal. What could be the reason for this?

    They can contact me direct to discuss and resolve this if they wish. Normally if that happens they might need to phone their bank and tell them that it is a valid international transaction. I've never heard of that happening with PayPal before though.

    Allan

  • pkm2023pkm2023 Posts: 10Questions: 1Answers: 0

    Hello Allen,
    Thank you very much for your lightning-fast reply. I will discuss this with the customer and then get back to you.
    Paulo

  • pkm2023pkm2023 Posts: 10Questions: 1Answers: 0

    Hello Allen,
    sorry, but it took a while. But sometimes things are a bit complicated with customers. But you will also know this.
    The customer still wants to buy the library. He has spoken to his bank and his credit card company several times and is not really getting anywhere. He has already sent you an email twice asking for an alternative option for paying with Paypal or credit card. Unfortunately, he hasn't received any response from you. So my question is, is it possible for him to send you this email directly and you can clarify the matter?
    I hope that we can somehow move forward.
    Best regards,
    Paulo

  • allanallan Posts: 61,038Questions: 1Answers: 9,953 Site admin

    He has already sent you an email twice asking for an alternative option for paying with Paypal or credit card

    I've not seen such an e-mail I'm afraid, sorry.

    I'll PM you with e-mail details.

    Allan

  • pkm2023pkm2023 Posts: 10Questions: 1Answers: 0

    Ok.

Sign In or Register to comment.