• Resolved randzgonz02

    (@randzgonz02)


    The Excel export functionality is working fine on my local computer, but after testing it on the staging site it produces this error:

    Fatal error: Can’t use method return value in write context in /home/content/46/8962346/html/qpsg_com_au/wp-content/plugins/advanced-cf7-db/admin/class/PHPExcel.php on line 51

    The plugin and the WordPress are already in the latest version.

    The PDF and CSV Export seem working fine except this one. Any help will be much appreciated, thanks in advance.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Vsourz Digital

    (@vsourz1td)

    Hello @randzgonz02,

    We have checked the export excel functionality for wordpress 4.9.8 and PHP version 7.2.12 and plugin is working fine.

    Can you let us know, which PHP Version you have on the server. If it’s below PHP5.6, we suggest you to upgrade or below is the fastest solution to the over get the issue for temporary basis.

    Step1 : Open “\wp-content\plugins\advanced-cf7-db\admin\class\PHPExcel.php” file and change the code at line no 51 as explained below:

    Existing Code :  if (!empty($this->getFile($file))) {
    Replace with the code :  if ($this->getFile($file)) {

    If still issue occurs don’t hesitate to contact us.

    Regards,
    Vsourz

    Thread Starter randzgonz02

    (@randzgonz02)

    Replacing the code solved the issue. Thank you very much for the fast response and quick solution!

    Anyway, the staging server is using PHP 5.4.19. What if we decided to upgrade to the latest version, should I restore back the original code we just changed or will you update the plugin code and we’ll just download its latest version?

    Once again thanks for the help. Very much appreciated.

    Plugin Author Vsourz Digital

    (@vsourz1td)

    Hello @randzgonz02,

    We are pleased that our solution helped you. According to us this won’t affect it or if incase, if it makes any issue, kindly reinstall the new version of the plugin, this will solve the issue.

    If you have found our plugin useful, don’t forget to rate us.

    Have a nice day.

    Regards,
    Vsourz

    Thread Starter randzgonz02

    (@randzgonz02)

    Noted with big thanks! 🙂

    it still does not work for me, I have uninstalled the plugin and I have reinstalled it with the last version and when exporting it to Excel it tells me that the file is damaged. He asks me if he wants to open it of all manderas, I say yes, and he appears to me like the images previously passed by randzgonz02

    Plugin Author Vsourz Digital

    (@vsourz1td)

    Hello @jrubeda,

    Can you let us know, which PHP Version you have on the server. If it’s below PHP5.6, we suggest you to upgrade or below is the fastest solution to the over get the issue for temporary basis.

    Step1 : Open “\wp-content\plugins\advanced-cf7-db\admin\class\PHPExcel.php” file and change the code at line no 51 as explained below:

    Existing Code :  if (!empty($this->getFile($file))) {
    Replace with the code :  if ($this->getFile($file)) {

    If still issue occurs don’t hesitate to contact us.

    Regards,
    Vsourz

    the php version we have is 7.2

    Plugin Author Vsourz Digital

    (@vsourz1td)

    Hello @jrubeda,

    Have you tried using the code that we have suggested you.

    If not then kindly try replacing the code, it may surely help you.

    If still issue occurs don’t hesitate to contact us.

    Thanks,
    Vsourz

    Good morning, the code that I have in that file is the one that I have to replace, I have it correct

    if ($ this-> getFile ($ file)) {

    Thanks @vsourz1td this answer work for me.
    Existing Code : if (!empty($this->getFile($file))) {
    Replace with the code : if ($this->getFile($file)) {

    Plugin Author Vsourz Digital

    (@vsourz1td)

    Hello @kguevaraj,

    Good to hear from you that the code has worked for you.

    Don’t forget to rate our plugin, if you have found it useful.

    Regards,

    Thanks @vsourz1td

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Exporting Excel Fatal Error’ is closed to new replies.