WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Album
[resolved] Generated warning (13 posts)

  1. jnpi
    Member
    Posted 1 year ago #

    Hello,

    I've got the following warning:

    Warning: Division by zero in /.../wp-content/plugins/bp-album/includes/bpa.template.tags.php on line 84

    Are you going to fix it anytime soon?
    If not, how can I fix it myself?

    Thank you for your efforts to support and improve this plugin.

    http://wordpress.org/extend/plugins/bp-album/

  2. foxly
    Member
    Plugin Author

    Posted 1 year ago #

    Nobody's ever reported that one before. What triggers the error?

    ^F^

  3. jnpi
    Member
    Posted 1 year ago #

    If I only knew...

    I only have fresh installations of WP 3.5 Multisite, BuddyPress, BuddyPress Template Pack and BP-Album enabled.

    Absolutely nothing else.

  4. foxly
    Member
    Plugin Author

    Posted 1 year ago #

    Post a link to a page on your site that generates that error when a user views the page.

    ^F^

  5. jnpi
    Member
    Posted 1 year ago #

    Dear foxly,

    I am glad to let you know that my problem has been solved. I only had to reset my Site Title and Description. The reseting process can be summed up to restoring the original Site Tite and Description and re-write the Site Title and Description to my liking. As much as change it may be, all warning messaged disappeared.

    I intend to tag the topic as resolved soon, but I will keep it open for a little while so you may contact me if you need any further information. If no further information is required, please let me know so as to proceed with the closing of this topic.

    Thank you for your immediate attention to my issue.

  6. jnpi
    Member
    Posted 1 year ago #

    Btw, I have also tested the pugin to another site and any warnings disappear after properly setting the BP Template Pack up. The reason might have been that the aforementioned plug-in was probably not properly installed on my first site, thus triggering the warnings.

  7. rossagrant
    Member
    Posted 1 year ago #

    Hi guys,

    Just had a look in my error log on my site which is running WP 3.5 and BP 1.6.2and I am also seeing bundles and bundles of that same error meesage:

    22-Dec-2012 00:06:01 UTC] PHP Warning: Division by zero in /home/.../public_html/wp-content/plugins/bp-album/includes/bpa.template.tags.php on line 84

    I used to have Buddypress template Pack installed but don't use it with my theme any more, it's no longer required.

    Any idea why this is being generated Foxly?

    Anything I can test mate?

    Thanks :)

  8. foxly
    Member
    Plugin Author

    Posted 1 year ago #

    We've spent some time investigating this defect, and it's happening because another template is passing "zero" or "null" to BP-Album when its expecting a page number.

    We can easily fix this, but we'd like some more details about which template is doing it.

    ^F^

  9. rossagrant
    Member
    Posted 1 year ago #

    Nice one Foxly!

    I'm not a coder, but if you let me know what I can do to help, I'll gladly test stuff for you guys!

  10. rossagrant
    Member
    Posted 1 year ago #

    Any update on this Foxly, or is there anything I need to do for you mate?

  11. foxly
    Member
    Plugin Author

    Posted 1 year ago #

    I'm not getting this error on my test system. However, you can resolve it on your server by making the following modification:

    In the file "bp-album/includes/bpa.template.tags.php"

    at line 80, insert the following block of code:

    if(!$this->pag_per_page){
    $this->pag_per_page = 1;
    }

    We will add this modification to future versions of the plugin.

    ^F^

  12. foxly
    Member
    Plugin Author

    Posted 1 year ago #

    Marked as resolved.

  13. rossagrant
    Member
    Posted 1 year ago #

    Nice one Foxly, really appreciate you coming back to me on this.

    I'll wait for the next version to patch this then. I only see the error once every now and again!

    Ross :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic