Closed DGTnt closed 10 years ago
Hey thanks for the report. I heard of a similar issue not too long ago and for the life of me can't remember what fixed it. I can assure you it does not have to do with the colored titles at least. Will keep this open until I can remember or find a way to replicate the problem to fix.
I have colored titles for my corp, and I'm not seeing any errors.
Do you have multiple titles with the same name? (we had several named "Unused") broke things horribly in another eve management app.
well, I do have 5 with the same name but just a different number considering the titles are also used to identify each person his hangar location for a slightly increase security in pos's.
Perhaps the images tells enough, atm this is the only thing filling up the error log
To figure out what triggers this (about every 2 hours for me) I tried to add some debug code to log more of the exception in the laravel.log, but somehow I did not find the right place for it.
What I noticed so far, is that this has nothing to do with permissions for the various cron or worker scripts. My best guess is that if some character has no title from the 'title'-management assigned and that it fails if
$security->titles as $role
from here is empty or not present.
Can someone please give an advise where to add something like Log::error($exception);
so it may be possible to log something more than Undefined index: titles
for an analysis on it ?
Can someone please give an advise where to add something like Log::error($exception); so it may be possible to log something more than Undefined index: titles for an analysis on it ?
I just pushed 41d6a7d8d2 to dev which will log traces when errors occur. You can then view them in detail in the queue status page. If you do not want to run the dev branch, edit app/queues/partial/EveCorporation.php
and the following code to the catch
block.
\Log::error($e->getTraceAsString());
It should now log to the laravel.log
My best guess is that if some character has no title from the 'title'-management assigned and that it fails if $security->titles as $role from here is empty or not present.
PHP will not error out when doing a foreach on a empty array:
λ php -a
Interactive shell
php > $test = ['1', '2'];
php > foreach ( $test as $k => $v ) { print 'hai'; }
haihai
php >
php > $test = [];
php > foreach ( $test as $k => $v ) { print 'hai'; }
php >
However, if $security->titles
does not exist in the XML it will. So, to debug this, please go and have a look at the XML (in app/storage/cache/phealcache/<corp keyID>/<vCode>/corp/MemberSecurity/Request_characterID:<charID>.xml
) and see if there is a member without this attribute set. A sample of a character without any roles or titles should look like this:
<row characterID="REDACT" name="REDACT">
<rowset name="roles" key="roleID" columns="roleID,roleName" />
<rowset name="grantableRoles" key="roleID" columns="roleID,roleName" />
<rowset name="rolesAtHQ" key="roleID" columns="roleID,roleName" />
<rowset name="grantableRolesAtHQ" key="roleID" columns="roleID,roleName" />
<rowset name="rolesAtBase" key="roleID" columns="roleID,roleName" />
<rowset name="grantableRolesAtBase" key="roleID" columns="roleID,roleName" />
<rowset name="rolesAtOther" key="roleID" columns="roleID,roleName" />
<rowset name="grantableRolesAtOther" key="roleID" columns="roleID,roleName" />
<rowset name="titles" key="titleID" columns="titleID,titleName" />
</row>
I may found something, all EVE Chars in one Corp where I am got a title in game and also the Dust Characters, but for the XML of the Corp Only the EVE Chars got the title attribute,
http://pastebin.com/sdzqwUEn - MemberSecurity XML without any Titles http://pastebin.com/JSeu6DpG - MemberSecurity XML with Titles, except for Dust Character http://pastebin.com/10MQwWaA - Stacktrace for it
I know that in another EVE Corp Management tool there was an similar issue about a year ago - that looks still unsolved by CCP ... here is a link for reference http://eve-corp-management.org/boards/2/topics/636?r=643#message-643
So the Question is if @DGTnt has any Dust Character's inside his corporation.
Ah, yeah Dusties in Corp totally broke some of the API stuff at one point. Oh CCP...... ECM is the 'other' corp management site i'm using atm. (which seems to be a dead project.)
@LunarchildEU great catch and thank you for the debugging! I have no DUST characters to test with which explains why I never was able to replicate this ^_^. Expect a fix soon™
@DGTnt are you able to test if this is fixed now from the dev branch?
k, applied the fix and will see what happen, will let you know something before I leave for work over a few hours. But yes, I Have a few corpies that are Dusties
Up untill now, no errors concerning titles. It appears that the fix helps.. I'll keep on following till tomorow morning
Great news thanks for the feedback!
Fix works for me too :)
Ok closing this off as done. Please open again if its still a problem, though I doubt it will be.
This appears on the Jobs page and nothing else related in all logs concerning titles.
Probably the case would be that I'm using using coloured titles to set permisions, per example: < color=0xff00E5FF >Researcher< /color > < color=0xff33E500 >Distributor< /color > < color=0xff33E500 >Trustee< /color > and etc... (remove the spaces)