Fork me on GitHub

HelpDesk - fatal error  Bottom

  • Installed this module ad I'm unable to Regenerate modules now because I get this error. Does anyone know what this means? Thanks.

    Fatal error: Call to undefined function _() in /dir/dir/dir/public_html/www.mydomain.com/modules/helpdesk/pnversion.php on line 13
  • Helpdesk is, so it seems, not for PN 0.7.6xxx

    Quote

    PostNuke Version: PostNuke adam_baum .800


    - Igor
  • You need to install the PHP gettext module as _() is a shortform of the gettext() command.
    If you can't get this module installed (because of your hosting company) you need to hack the program 'locale/pn_gettext.php' to return the unmodified string.

    Let me know how it goes.

    Bernd
  • My hoster said the following. So I should hack the file? Could you please be more specific? How do I hack the file exactly? what are the lines?

    >> The "gettext" program is installed on the server but PHP isn't
    compiled to use it.
  • There are 2 solutions:

    1) ask your hoster to install the PHP-gettext module

    2) add the following code at the end of the locale/pn_gettext.php file:

    /**
    * N_
    * This function just returns what it receives, see gettext
    * manual for noopt function.
    */
    function N_($string) {
    return $string;
    }

    Hope this helps!

    Bernd
  • Sorry but this didn't work
  • Add the following 2 functions at the end of pn_gettext.php:

    /**
    * gettext
    * This function just returns what it receives, see gettext
    * manual for noopt function.
    */
    function gettext($string) {
    return $string;
    }

    function _($string) {
    return $string;
    }

    Good luck,

    Bernd
  • Just tried again and the same error message occurs. Not for .762??
  • While I'm quite willing to help you I can't really help you if all you are saying is "same error message occurs".
    I gave you detailed information about how to provide a dummy function for the missing gettext function. Please modify the program accordingly are ask your hosting company to install the PHP gettext module. For most Linux distributions separate modules are available and thus there is no need to re-compile PHP.

    Regards,
    Bernd
  • Sorry perhaps I wasn't being clear I did add the code as you suggested to the end of the file but I still received the same message.
  • Fatal error: Call to undefined function _() in /dir/dir/dir/public_html/www.mydomain.com/modules/helpdesk/pnversion.php on line 13

    This is what you wrote back in April. If you added the 2 above mentioned functions AND the program is found and included it is NOT possible that you get the same error message.
    You need to make sure that two functions are available.
  • I have a different problem. When i try to activate the module or Regenerate List i get no page found, when i delete the helpdesk module everything work fine. I need help to get this installed.. Is this an upgrade version or new installation?
  • Are you uploading the correct directory with correct subdirectories and files. Double check to make sure the pninit.php is in the highest directory you upload.

    --
    David Pahl
    Zikula Support Team

This list is based on users active over the last 60 minutes.