Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 11834
Latest: Volker S
New This Month: 1
New This Week: 1
New Today: 0
Stats
Total Posts: 42319
Total Topics: 7381
Most Online Today: 219
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 34
Total: 34

Author Topic: Error with 6.0a version  (Read 332 times)

0 Members and 1 Guest are viewing this topic.

Offline Hatshepsut

  • SMF Gallery Pro Customer
  • Jr. Member
  • *****
  • Posts: 60
  • Perfectionist
    • View Profile
    • Bulgarian Nationalist Forum
Error with 6.0a version
« on: March 14, 2022, 02:13:14 am »
Hello,

I'm using Downloads System Pro 6.0a version on my SMF 2.1.1 forum, PHP version: 8.0.16, MySQL version: 10.3.34-MariaDB

I get error messages (~ 10-40 per day):

PHP Warning:  Undefined array key "percent" in /home/bulataka/public_html/BNF/Themes/default/Downloads2.1.template.php on line 4324
« Last Edit: March 14, 2022, 02:21:22 am by Hatshepsut »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16045
    • View Profile
Re: Error with 6.0a version
« Reply #1 on: March 15, 2022, 09:59:25 am »
Copy this to your themes/default folder fixes the bug
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Hatshepsut

  • SMF Gallery Pro Customer
  • Jr. Member
  • *****
  • Posts: 60
  • Perfectionist
    • View Profile
    • Bulgarian Nationalist Forum
Re: Error with 6.0a version
« Reply #2 on: March 15, 2022, 11:54:38 pm »
I have replaced this file, but still get the same error messages.
Noticed that errors occur only when Downloads stats page is viewed, in group x10 at each time.

Also noticed, that I got these errors since one member has been rated 10 files in Downloads.
« Last Edit: March 16, 2022, 08:03:44 am by Hatshepsut »

Offline Hatshepsut

  • SMF Gallery Pro Customer
  • Jr. Member
  • *****
  • Posts: 60
  • Perfectionist
    • View Profile
    • Bulgarian Nationalist Forum
Re: Error with 6.0a version
« Reply #3 on: April 26, 2022, 05:57:38 am »
I have edited template file and removed percent key. The errors disappear :)

(Lines 4320-4327)

Code: [Select]
foreach ($context['top_rating'] as $file)
    {
        echo '<dt>', $file['link'], '</dt>
        <dd class="statsbar generic_bar righttext">
 <div class="bar" style="width: ' . 0  . '%;"></div>
 <span>' . $file['rating'] . '</span>
 </dd>';
    }

Now top rated files are displayed as before, only with their rating stars.
Maybe the mod cannot transform rating star given to percent value?

Offline Hatshepsut

  • SMF Gallery Pro Customer
  • Jr. Member
  • *****
  • Posts: 60
  • Perfectionist
    • View Profile
    • Bulgarian Nationalist Forum
Re: Error with 6.0a version
« Reply #4 on: April 26, 2022, 06:03:50 am »
Also I have removed an unnecessary ` character from line 4281:

Find:
Code: [Select]
</dl>   `
Replace with:
Code: [Select]
</dl>

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16045
    • View Profile
Re: Error with 6.0a version
« Reply #5 on: April 28, 2022, 06:12:09 am »
Changes added to newest release.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Hatshepsut

  • SMF Gallery Pro Customer
  • Jr. Member
  • *****
  • Posts: 60
  • Perfectionist
    • View Profile
    • Bulgarian Nationalist Forum
Re: Error with 6.0a version
« Reply #6 on: May 10, 2022, 12:44:52 am »
Changes added to newest release.

Thanks, with new 6.0.2a version the errors are gone :)

 

Related Topics

  Subject / Started by Replies Last post
37 Replies
24327 Views
Last post December 27, 2007, 10:22:10 pm
by SMFHacks
6 Replies
6282 Views
Last post August 13, 2009, 10:08:32 pm
by SMFHacks
3 Replies
4916 Views
Last post November 19, 2012, 11:54:22 pm
by SeaChaser
3 Replies
1943 Views
Last post February 01, 2013, 08:51:39 pm
by phxmaximus
13 Replies
1454 Views
Last post January 06, 2021, 08:04:05 am
by davejo

+- Recent Topics

Profile Gallery Link by Hatshepsut
July 04, 2022, 11:00:01 pm

Trying to access array offset on value of type null by SMFHacks
July 04, 2022, 08:14:20 pm

Pictures appearing in post by SMFHacks
July 04, 2022, 12:56:40 pm

Error When Uploading Gifs To Subcategories by SMFHacks
July 03, 2022, 05:50:19 pm

SMF forum by davejo
June 27, 2022, 01:16:25 am

Quick-moderation checkboxes by davejo
June 22, 2022, 09:27:24 am

Add option to Main Menu bar by Shades
June 21, 2022, 12:23:00 am

Logo and Category? by SMFHacks
June 12, 2022, 03:43:31 pm

prettyurls - TroubleShooting.wiki by GhostHunting
June 12, 2022, 02:52:57 pm

[Mod]Modification Update Version Checker by SMFHacks
June 06, 2022, 09:25:39 pm

Powered by EzPortal