Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Games Data #43

Open
TheBreznsoiza opened this issue Nov 1, 2022 · 8 comments
Open

No Games Data #43

TheBreznsoiza opened this issue Nov 1, 2022 · 8 comments

Comments

@TheBreznsoiza
Copy link

Hey guys anyone else seeing this bug, "no data" on the left where the games should appear?

Standings are okay, seemed that FotMob has changed something again image

@matthiasjaekel
Copy link

Hey @DasBlatz,
I am facing the same issue.
@thejosejorge Can you please have a look?
Thanks in advance.

@beratgashi
Copy link

Yes, i'm facing this issue for a week now!

Seems that no one hasn't found out a quick fix for this 🙃

@hangoon-p
Copy link

hangoon-p commented Nov 2, 2022

I just noticed it and here's the fix.

First of all, you need to find the function named "addWidgetMatches".
Based on Jose's code, it starts from line 164.

Then, just replace old code to new one as below.

Old :

async function addWidgetMatches(globalStack) {
    const nextMatch = teamData.nextMatch;

    let previousMatchIndex = teamData.fixtures.length - 1;
    if (nextMatch) {
      for (let i = 0; i < teamData.fixtures.length; i += 1) {
          if (teamData.fixtures[i].id === nextMatch.id) {
              previousMatchIndex = i - 1;
              break;
          }
      }
    }
    const previousMatch = teamData.fixtures[previousMatchIndex];

NEW :

async function addWidgetMatches(globalStack) {
    const nextMatch = teamData.fixtures.allFixtures.nextMatch;

    let previousMatchIndex = teamData.fixtures.allFixtures.fixtures.length - 1;
    if (nextMatch) {
      for (let i = 0; i < teamData.fixtures.allFixtures.fixtures.length; i += 1) {
          if (teamData.fixtures.allFixtures.fixtures[i].id === nextMatch.id) {
              previousMatchIndex = i - 1;
              break;
          }
      }
    }
    const previousMatch = teamData.fixtures.allFixtures.fixtures[previousMatchIndex];

Hope it helps you guys.
@DasBlatz @beratgashi @matthiasjaekel

@beratgashi
Copy link

@hangoon-p thank youuu man it works perfectly 👏

@hangoon-p
Copy link

hangoon-p commented Nov 2, 2022

Guys,
After I fixed that error, I found out the match time shows the timezone which your team located. (not your local time.)
If you have same problem, follow the instruction below.

First, find the code which you need to change.
In Jose's code, it is at Line 202.

const matchDetailsUrl = `${matchDetailsApiUrl}${match.id}`;

If you find it, replace it to the code as below.

const matchDetailsUrl = `${matchDetailsApiUrl}${match.id}&timezone=${userSettings.timeZone}`;

There's a thing left to change.

Find the code to change. (In Jose's, Line 84)

const teamDataApiUrl = encodeURI(`${baseApiUrl}/api/teams?id=${userSettings.teamId}&tab=overview&type=team&timeZone=${userSettings.timeZone}`);

Then replace it to below.

const teamDataApiUrl = encodeURI(`${baseApiUrl}/api/teams?id=${userSettings.teamId}&tab=overview&type=team&timezone=${userSettings.timeZone}`);

It will show right match time in your local timezone.

@DasBlatz @beratgashi @matthiasjaekel

@beratgashi
Copy link

Hey @hangoon-p, once again we need your help on fixing the new issue undefined is not an object!

Thanks for your efforts on helping us!

@hangoon-p
Copy link

@beratgashi
I issued new post for this.
In there you can find my solution.

@JuJT
Copy link

JuJT commented Jan 27, 2024

Now, I have this error : 2024-01-27 18:08:41: Error on line 297:131: TypeError: undefined is not an object (evaluating '(matchDetails.content.matchFacts.infoBox["Match Date"].dateFormatted).replaceAll')

How can I fix that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants