Comments (17)
I'll do some investigation on this ASAP.
Though, I've also stumbled upon a couple users that are returned by the API which have an empty identities array (instead of an object)
e.g.https://api.spigotmc.org/simple/0.1/index.php?action=getAuthor&id=68433 https://api.spigotmc.org/simple/0.1/index.php?action=getAuthor&id=68413
Good catch on the object vs array. That was unintentional. I'll make that more consistent.
from xenfororesourcemanagerapi.
I just regained access to an XF installation, so I'll be debugging this soon.
from xenfororesourcemanagerapi.
they all don't have identities, maybe thats it?
from xenfororesourcemanagerapi.
Yeah, was thinking the same. Looks like it's doing an inner join on 3 tables, including the one seemingly containing the identity info, so it might just skip everyone without identity info.
XenforoResourceManagerAPI/support/Database.php
Lines 56 to 63 in 284b288
from xenfororesourcemanagerapi.
Though, I've also stumbled upon a couple users that are returned by the API which have an empty identities array (instead of an object)
e.g.
https://api.spigotmc.org/simple/0.1/index.php?action=getAuthor&id=68433
https://api.spigotmc.org/simple/0.1/index.php?action=getAuthor&id=68413
from xenfororesourcemanagerapi.
if matters, while that api action returns 404, if you use action=getResourcesByAuthor&id=45870 it shows their resources.
from xenfororesourcemanagerapi.
So, on my local install of XenForo every new user has the xf_user_field_value
's automatically generated although they are blank.
I am guessing Spigot's installation is not doing this, for whatever reason.
I am not sure if a different type of join would work better or if I should just do two separate queries for the necessary data.
Comments?
from xenfororesourcemanagerapi.
@simpleauthority yeah I just picked a random user (45870) and xf_user_field_value is indeed empty for them
from xenfororesourcemanagerapi.
Doing a left instead of an inner join should, in theory, help with this. Instead of not returning the users without identities at all, they should return NULL identities when left-joining.
from xenfororesourcemanagerapi.
Well, it's worth a try for sure. I'm not sure I understand why for some users it works but for others it doesn't when xf_user_field_value is always present but empty. The join should work in any case. I can't reproduce locally, so the way we'd have to test would be push to prod and see if it helped which is less than ideal.
from xenfororesourcemanagerapi.
Could just wipe em from your test db.
I'm not sure why they're not filled in on Spigot; could be xenforo versions or way users are created
from xenfororesourcemanagerapi.
Could just wipe em from your test db.
I'm not sure why they're not filled in on Spigot; could be xenforo versions or way users are created
That's the thing though. On my test db, I have a user with blank xf_user_field_value
's like you described (none are null) and it works fine. Since they're not null, the inner join should work just fine.
I'm open to trying the left join, but I can't reproduce locally so I would have no way of knowing if the change of join works or not.
from xenfororesourcemanagerapi.
I'm open to trying the left join, but I can't reproduce locally so I would have no way of knowing if the change of join works or not.
DELETE FROM xf_user_field_value WHERE user_id=99
Its a test DB, you should just be able to do that and see if it still works
from xenfororesourcemanagerapi.
I gotcha. I'll try it soon.
from xenfororesourcemanagerapi.
This is weird, any updates on the solution?
from xenfororesourcemanagerapi.
I just regained access to an XF installation, so I'll be debugging this soon.
Alright sounds good
from xenfororesourcemanagerapi.
Works fine locally with missing rows in the xf_user_field_value
table -- in my local install, they're never missing, but they are in Spigot. This may be a patch fix from XF that I have which Spigot doesn't...unknown. Regardless, #29 fixes it.
from xenfororesourcemanagerapi.
Related Issues (20)
- Minecraft Versions are displaying weirdly HOT 2
- Add ability to specify sorting mode for resource listing HOT 2
- Improve documentation HOT 9
- Send 404 when the resource or author is not found HOT 6
- Little error on README.md
- [Suggestion] Expose Resource Version in `getResourceUpdate` Response HOT 3
- Wrong default icon HOT 2
- `native_minecraft_version` and `supported_minecraft_versions` return null. HOT 6
- List number of resources & resources per page in API response HOT 1
- Add JSON requests instead of URI requests HOT 8
- Premium Verifier HOT 3
- Get information to members (getMemberById) HOT 7
- Endpoints for authenticating an application with user credentials HOT 8
- Lower the cache TTL for author-related endpoints HOT 6
- `listResources` endpoint category parameter issues HOT 3
- Include category in endpoints returning resource information
- Suggestion: improvements to getResourceUpdate HOT 3
- The paginated pages in the api are in reverse order to spigot pages HOT 3
- API returning wrong resurces? HOT 4
- Add a way of searching SpigotMC resources HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xenfororesourcemanagerapi.