Zenpage : Notice: printPasswordForm (...) is deprecated.

hucste Member
I've upgrading one of mines zenphoto with 1.4.1 and i've this error when i'm attempting to connect on album closed.

`

Notice: printPasswordForm (appelé(e) depuis la ligne 34 de password.php) est dépréciée printPasswordForm custom theme password forms is deprecated. You should style the form created by the Zenphoto_Authority class (or its derivatives) instead. Use of these forms will prevent alternative credentials implementations from working with a theme

`

How replace it ?

Comments

  • acrylian Administrator, Developer
    The notice tells it actually.
  • As a side note, you can disable this message (and all "deprecated" messages) via the deprecated functions plugin options. Do this until you have the time to address the root issue described.
  • hucste Member
    yeahh, i know this ... but if i disable this function, it's not possible after to login on album protected!

    another idea?
    with what's code to change this issue on the script password.php on the zenpage theme?!
  • yeahh, i know this ... but if i disable this function, it's not possible after to login on album protected!
    Not at all true.

    First, disabling the message just does that, stops the message from displaying. It does NOTHING else. Your custom form is still used. I know that English is not your primary language, but really, you should read more carefully.

    Second, if you choose to remove the form (which you should if you want your theme to be generally usable) then the Zenphoto form is used. The message tells you that you should use CSS styling on this form's elements to make it fit with your theme. How hard is that?
  • hucste Member
    Excuse-me if i continue with this ...
    But, if i disable the deprecated functions, it's not possible to connect on album protected.

    One message error is displayed :
    `

    La page que vous essayez d'afficher est protégée par mot de passe.

    Fatal error: Call to undefined function deprecated_function_notify() in /.../zenphoto.dev.stephane-huc.net/zp-core/template-functions.php on line 4466`
    Please, see this url: http://zenphoto.dev.stephane-huc.net/test/

    Due, it's not possible to connect !

    You said me that modify CSS ... but, it's the zenpage theme original !
    (now, zenpage 1.4.0 into zenphoto 1.4.1.1, ).

  • If your theme is using deprecated items you cannot (naturally) disable the deprecated functions plugin.

    You really need to carefully read what is posted (specially when English is not your native language.) No one has said to disable the plugin--what we have said is to disable the error message. Quite a different animal.
  • hucste Member
    Eh, oh, the zenpage theme is yours native!
    You have a problem with it.

    I can modify or correct this if you not help me correctly!
  • hucste, what's happened is that there was a change to the authority. It no longer requires the password_form.php file in the themes as it posed a security risk (from what I understood).

    So, with the change the password_form.php is no longer necessary and has been deprecated. What they're explaining is that there are one of 2 (well 3 technically) options for you.

    1st option: Remove the password_form.php from your theme. It's no longer necessary. Style the password/login box via css.

    2nd option: go into admin->options->plugins->deprecated-functions

    Once there you can choose which warning messages to turn off. This will allow you to leave your password_form.php file in place without the warning.

    3rd option: Leave everything as it is and just deal with the error message :P

    And to clarify, if you upgraded from and older version of zenphoto but didn't follow all the upgrade steps and left the default themes from the older version, it will still have that password_form.php file in it.
  • hucste Member
    Thanks, micheall ...
    i delete this script ;-)

    In fact, i verify the numero of the version on script 'theme_description.php' when zenphoto new version.
    Since, zenphoto 1.4.0, the zenpage theme is egual...

    I compare files with the soft Meld, but i don't think others changes on this theme than file deleted.

    Very Thanks.
Sign In or Register to comment.