• Somehow dk_speakout_Petition::all gets a $limit of +INF.

    The limit value needs to be constrained.

    Add this to the all method;

    
    		$limit = (int) $limit;
    		
    		if ($limit <= 0 || $limit < $start || !is_finite($limit)) {
    			$limit = PHP_INT_MAX;
    		}
    
    • This topic was modified 5 years, 5 months ago by youngcp.
Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author SpeakOut!

    (@123host)

    Thanks for that feedback @youngcp . Can you give me some details on any problems this is causing or errors thrown? In my testing site that has no petitions I can’t see any issues.

    Thread Starter youngcp

    (@youngcp)

    We created a petition and the table looked like this;

    All Petitions (1) 1 items 1 of INF > >>
    ID Petition name Shortcodes Signatures Goal
    ID Petition name Shortcodes Signatures Goal
    1 items 1 of INF > >>

    I added an echo inside the $petitions for loop, was not hit.
    I added more echos and a print_r to find the array was empty and the SQL string generated ended with ‘LIMIT 1, ‘ (missing the actual limit variable).

    It still reads ‘1 of INF’ but now the petition is shown.

    Image: https://images2.imgbox.com/19/d3/fzcFxXyc_o.png

    • This reply was modified 5 years, 5 months ago by youngcp.
    • This reply was modified 5 years, 5 months ago by youngcp.
    Plugin Author SpeakOut!

    (@123host)

    Thanks for that info. I think the problem may be that you are using an old or modified version of SpeakOut! plugin.

    A few versions ago I removed the pagination links if there is only one page of petitions. The fact that they are there indicates it may be not up to date.

    Which version? If you are using 1.17.5 can you post a link to the petition page?

    Thread Starter youngcp

    (@youngcp)

    This is a fresh install of the plugin v1.17.5 on a WordPress.com hosted site, running WP v5.2.3.

    We can not post a link at this time, the contents are not public yet.

    From downloading the plugin v1.17.5 zip file (https://downloads.wordpress.org/plugin/speakout.zip) and navigating to speakout/includes/petitions.view.php:11, the pagination is still present.

    • This reply was modified 5 years, 5 months ago by youngcp.
    • This reply was modified 5 years, 5 months ago by youngcp.
    • This reply was modified 5 years, 5 months ago by youngcp.
    Plugin Author SpeakOut!

    (@123host)

    Hmmm…this is very odd. Here is a screenshot of a clean install of 1.17.5 for me https://gyazo.com/8c43feb7c5de0d207427547c8a385716

    Can you go to https://speakout.123host.net.au/contact and get in touch with me by email, I am curious about what is going on here.

    Thanks

    Thread Starter youngcp

    (@youngcp)

    Ok, I sent you a message via the form.

    Plugin Author SpeakOut!

    (@123host)

    OK. I think I have found the problem.

    If you go to dashboard > SpeakOut! > settings > admin display tab – I think you may have 0 in that field.

    That recreates the INF for me. If that is so, change the value to something reasonable, the default is 20. I am going to add some code to prevent a value of 0 being saved.

    Thread Starter youngcp

    (@youngcp)

    https://images2.imgbox.com/30/0a/YJHs1MZ1_o.png

    I have nothing in that field, this is a new install.

    Settings have not been configured. The default is blank.

    Changing it does resolve the issue.

    • This reply was modified 5 years, 5 months ago by youngcp.
    Plugin Author SpeakOut!

    (@123host)

    OK, send me the login and let me have a look.

    Thanks for working with me on this, I appreciate it.

    Plugin Author SpeakOut!

    (@123host)

    I have just pushed version 1.17.6 – can you save the settings page and see if that solves this?

    Thread Starter youngcp

    (@youngcp)

    If you could, reply to the email address I submitted in the contact form and I’ll create the account and have WP send you the account details.

    Will do.

    Thread Starter youngcp

    (@youngcp)

    When saving with the fields blank, they now default to 1.

    I’d rather not try wiping the settings from the database to try a “clean” setup to see if the defaults work properly on this site though.

    Thanks for updating the plugin.

    • This reply was modified 5 years, 5 months ago by youngcp.
    Thread Starter youngcp

    (@youngcp)

    I’m in UTC-4, so it’s late, so I may reply tomorrow.

    Plugin Author SpeakOut!

    (@123host)

    Tyler, I did respond to your email. Did you receive that?

    Also, that is very deliberate having the settings default to 1 if you leave it blank (or if you save it as 0). Having the number of petition rows to display be blank doesn’t make sense – logically it needs to be some value.

    If you want it “infinite” then set it high.

    Hope that helps.

    Thread Starter youngcp

    (@youngcp)

    I set them to the “defaults” written beside them of 20 and 50 for petition and signature tables respectively.

    Unfortunately I have not received any reply email.

    With a bit of googling, I assume the email address for the creation of the account will be speakout###@###123host.com.au sans hashes?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Blank petition list’ is closed to new replies.