TheGameSpider / TechnicSolder

A better version of https://github.com/TechnicPack/TechnicSolder
https://solder.cf
Other
22 stars 18 forks source link

Clicking "add modpack" breaks Solder.cf. Effectively turning it into a blank page. #39

Closed JadianRadiator closed 2 years ago

JadianRadiator commented 3 years ago

Describe the bug Clicking "add modpack" breaks Solder.cf Effectively turning it into a blank page.

To Reproduce Steps to reproduce the behavior:

  1. Install LAMP stack
  2. Install Solder.cf dependencies not included in LAMP stack
  3. Install Solder.cf
  4. Up the max upload sizes as needed by your mods
  5. Install/upload the forge you need
  6. Install/upload the mods you need
  7. Go to the modpacks tab
  8. Click "add modpack"

Expected behavior I expected it to make a new modpack entry that I can then setup

Screenshots https://imgur.com/a/iJBwIuI

Additional context It works fine before I tried making a modpack in it. I'm pretty sure the issue is the github doesn't include the default/built-in modpack directory in the file/folder structure in the repo. And I have no idea what the default/built-in modpack directory is. I've tried Firefox's "forget this site", which did nothing. Tried completely starting over from scratch, which did nothing. I have no idea how to reset the database. And even if I did, this bug would just happen again as soon as I clicked the "add modpack" button.

JadianRadiator commented 3 years ago

I tried resetting the database.... Which had no apparent effect what-so-ever.

winnipeg21 commented 2 years ago

Happens to me too, have to delete the new modpack from the DB in order to fix it.

ZandercraftGames commented 2 years ago

Happens to me too, have to delete the new modpack from the DB in order to fix it.

Hmm. Are there any DB errors in your MySQL logs?

82280zx commented 2 years ago

I forked his build over to mine for now till he can get this repaired I also updated his guide, some things wasn't setup right in it, if you want this to work right follow my guide over here https://github.com/82280zx/TechnicSolder/blob/master/README.md I was able to get mine up and running today.

DrunkenMonk0001 commented 2 years ago

Happens to me too, have to delete the new modpack from the DB in order to fix it.

Hmm. Are there any DB errors in your MySQL logs?

I'm having this problem too, no errors produced in the MySQL logs, checking the DB, the entries look fine?

The entire site breaks, no pages display anything with anything entered into the modpack table, so something must be uncaught in the index page

*edit; if I change line 447 of index.php to not be able to resolve e.g

if(mysqli_num_rows($result)==500) {

(result will never happen)

the rest of the site works, but to enter into any form of modpack editing I have to keep clicking add modpack until it eventually responds, sometimes it works by the second attempt, sometimes it takes 5 or 6 attempts, creating 5/6 unnamed, empty modpacks...

ZandercraftGames commented 2 years ago

Have you tried reverting to PHP 7.2? I know that has helped some people with these issues.

DrunkenMonk0001 commented 2 years ago

Resorted to switching to cowpod's fork which seems to work despite only changing the forge fetching? so maybe it was a lingering permissions issue? something reset somewhere more than likely due to a file being changed or created, but switching php versions isn't really an option as it's far too involved on a new setup (where 8.1 is installed by default using apt install php) and switching a lot of the defaults breaks other things that were dependant on 8.1

The only things preventing this working fully on php 8.1 are some uninitialized strings and arrays that are referenced before being defined or have no 'defaults'. Just the age old story of nobody wants to fix somebody elses junk. Rolls back around to "if you want something done, you're best off doing it yourself"... Which I'm sure is the conclusion a lot of folks came to when forking.

winnipeg21 commented 2 years ago

This was my fix previously

log into mysql use solder; SELECT * FROM modpacks LIMIT 20; DELETE FROM modpacks WHERE id = ID; (ID being the item number that isn't a modpack)

ZandercraftGames commented 2 years ago

Just the age old story of nobody wants to fix somebody elses junk.

Should see the repo I'm working on. I've easily made at least a thousand small fixes today... If not more with regard to syntax, errors, mess, etc. Not to mention security... I'm about ready to pass out 😆

DrunkenMonk0001 commented 2 years ago

Just the age old story of nobody wants to fix somebody elses junk.

Should see the repo I'm working on. I've easily made at least a thousand small fixes today... If not more with regard to syntax, errors, mess, etc. Not to mention security... I'm about ready to pass out 😆

Yeah, if I clone your repo I get this exact same problem reoccurring, though since I actually turned on errors since, I can see it's a fatal due to a sticky php7>php8 difference where php7 doesn't care and will autocorrect itself but php8 very much cares and throws a fatal instead 🤣 not sure how or why it was fixed in cowpod's repo, but that repo also has it's own issues with uninitialized strings and arrays that are called before they're assigned anything, which php8 hates and php7 doesn't tend to care about, though you obviously specifically recommend php7.2 during setup, which means at least "new" setups will work without any issues using your repo

ZandercraftGames commented 2 years ago

That'll do it :) Thanks @DrunkenMonk0001 !

ZandercraftGames commented 2 years ago

Hey guys. Sorry about the blank page issue. I've realized there are still a few changes that need to be made. I'll open another PR soon to fix them. In the meantime, using PHP 7.2 fixes the issue. This project is by no means compatible with 8.x in its current state. @DrunkenMonk0001 and I have been working to fix that, but it will have to come in the next update.