PHPLD - fixing “SmartyValidate: [is_valid] form ‘login’ is not registered” error

PHP Link Directory is one of the most popular link directory packages available today.

One of our clients uses this package to run a local business directory, and experienced the following problem:

Notice: SmartyValidate: [is_valid] form ‘login’ is not registered. in /path/to/html/libs/smarty/SmartyValidate.class.php on line 273

The log in box also features the following message:

Notice: SmartyValidate: [validate plugin] form ‘login’ is not registered. in /path/to/html/libs/smarty/plugins/function.validate.php on line 46

This problem manifests when trying to login to the administration area of the link directory, and so therefore is a pretty show-stopping error.  What’s more, no changes had been made to the site for months, and so there was no obvious reason for why the error should suddenly appear.

A check on Google showed that others had also experienced this problem - random occurrence and all - however, a ‘fix’ wasn’t available (PHPLD forum post)

Our client is not the kind of person willing to wait for the problem to go away, and so we began investigating.  After a few hours investigating, we noticed something that had changed since the login last worked - disk space on the hosting account used had reached it’s maximum level.

Deleting some log files brought in back under quota, and lo and behold, the client was able to access their PHP Link Directory admin section again!!

(It should be noted that this is not a ‘confirmed’ fix, in that there’s nothing official about it anywhere - however, it does seem to fix the problem for us, so we thought we’d share!)

Some other random posts:

8 Responses to “PHPLD - fixing “SmartyValidate: [is_valid] form ‘login’ is not registered” error”


  1. 1 PHPLDOwner

    Just wanted to let everyone know that this fix *is* confirmed as far as I’m concerned - I’ve used this technique three times to fix this login problem with my PHPLD site, and it’s worked each time.

    Thanks for sharing!

  2. 2 Sanjeev

    Hi,
    i have more disk space. but i face this error.
    I am not able to enter in the admin area at all
    Thanks,

  3. 3 PHPLDOwner

    Are you sure you’ve cleared enough to be back under quota? Log files is the thing that always kills me, and you don’t usually see these unless you go looking for them :)

  4. 4 Elantrix

    It’s possible for that error to occur when you have no quota in disk space left on your server as SmartyValidate relies on registering the form fields into sessions which normally reside in the tmp folder.

    But the actual reason for the error is usually caused by the SmartyValidate elements in the template not being registered by the PHP script, this usually occurs when the developers forgot or dont properly register validators, and when the user tries to go back and re-sends the form elements which have been de-registered after the successful submission before.

    The solution is quite simple, either do:

    // Also checks to see if the form has been registered before being submitted
    //
    if (isset($_POST) && is_registered_form($form)) {
    }
    else {
    // register form validators
    }

    OR

    // Sometimes it’s best to force the user back to the webpage so that all data can
    // be reset and ensures that the user doesnt accidently resend data.
    //
    if (isset($_POST) && !is_registered_form($form)) {
    header($_SERVER['SCRIPT_NAME']);
    die();
    }

  5. 5 rob

    Thanks for the tip - that explains what I hadn’t quite got my head around, which is Why clearing out disk space resolves the problem.

    So nice having people who know what they’re talking about drop by! ;-P

  6. 6 al

    Elantrix if you are familiar with PHP Link Directory, where would we put that code?
    Or do we need to change this:

    if(!SmartyValidate::is_registered_form($_form)) {
    trigger_error(”SmartyValidate: [validate plugin] form ‘$_form’ is not registered.”);
    return false;
    }

    Thank you for you help.

  7. 7 Carlos

    I have an error like that in submit_article page:
    Notice: SmartyValidate: [validate plugin] form ’submit_link’ is not registered. in /home/procurar/public_html/dir/libs/smarty/plugins/function.validate.php on line 46

    Can some one help me?

  8. 8 punro

    So,you can add in your submit-article.PHP file ,at the end of block wich contain

    SmartyValidate :: connect();

    the following line:

    SmartyValidate :: disconnect();

    the clue is(worked for me!) to disconnect AFTER connect

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*
RSS for Posts RSS for Comments