1084

Website publisher account setup bug

Comments for “Website publisher account setup bug”
 

Posted by Dom on Friday 22nd March 2024 at 13:14 GMT

There's currently a bug on the publisher account setup page. If you enter a publisher name and then select No payment req and click submit it will fail because of an incorrectly formatted paypal email address, which rather ironically, given that you're not intending to charge, you couldn't enter anyway as you aren't given the chance.
Level One Member

Dom

User Level: Level One Member

Date Joined: 12/01/2024

Posted by DaFa on Sunday 24th March 2024 at 21:20 GMT

Hi Dom,

Did DC's livestream fix work for you?

If not let me know and I'll look into it.
Founding Member

DaFa

User Level: Founding Member

Date Joined: 30/11/2018

Posted by Dom on Monday 25th March 2024 at 08:04 GMT

Hi Simon
Unfortunately not. Pretty easy to replicate, just head to the page in question fill in a name, select the no payment required option and hit the submit button. At that point you'll get a validation error about a malformed paypal email address.
Level One Member

Dom

User Level: Level One Member

Date Joined: 12/01/2024

Posted by DaFa on Tuesday 26th March 2024 at 07:47 GMT

No probs Dom, I found the issue and have corrected the way the create publisher account handles the form.
//fix by DaFa - if the user has selected 'No Payment Mechanism'
if (post("paypal_email") !== '') {
    $this->validation_helper->set_rules('paypal_email', 'Paypal email address', 'valid_email');
}
I've also changed the background colour so you can read the 'PLEASE NOTE' text a bit better.
.form-help {
    background-color: #333333;
    padding: 2px 12px;
    border-radius: 2px;
    font-size: 0.9em;
    margin: 4px 0;
    text-align: left;
}
And restored the 'submit' method for the 'required' validation check DC took out in the live stream.
$this->validation_helper->set_rules('paypal_email', 'Paypal Email', 'required|min_length[7]|max_length[255]|valid_email_address|valid_email');
Let me know how you get on.
Cheers,
Si

This comment was edited by DaFa on Tuesday 26th March 2024 at 07:50 GMT

Founding Member

DaFa

User Level: Founding Member

Date Joined: 30/11/2018

×