These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Yapeal PHP API library (2.0)

Author
Tiberius Zol
Moira.
Villore Accords
#101 - 2014-08-25 18:58:33 UTC  |  Edited by: Tiberius Zol
solved

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Tiberius Zol
Moira.
Villore Accords
#102 - 2014-08-25 19:00:10 UTC  |  Edited by: Tiberius Zol
quick feedback:

Quote:

/htdocs/eve/yapealneu/bin/sql/updates/201408131139.sql
..................CALL "db478456446"."AddOrModifyColumn"('db478456446',
'yp2_corpWalletTransactions',
'characterName',
'CHAR(50) NOT NULL')
Sql failed in /htdocs/eve/yapealneu/bin/sql/updates/201408131139.sql on statement 18 with (01000) SQLSTATE[01000]: Warning: 1265 Data truncated for column 'characterName' at row 1

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Tiberius Zol
Moira.
Villore Accords
#103 - 2014-08-25 19:09:44 UTC
ok after setting the table column manually there was no more error.

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Dragonaire
Here there be Dragons
#104 - 2014-08-25 19:41:08 UTC
Tiberius Zol - So are you seeing character names longer than 50 characters?

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Tiberius Zol
Moira.
Villore Accords
#105 - 2014-08-25 19:50:36 UTC
Nope, but characterName column is empty now.. and characterID column is NULL everywhere.

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Tiberius Zol
Moira.
Villore Accords
#106 - 2014-08-26 12:25:54 UTC  |  Edited by: Tiberius Zol
just for your information: i set the isActive flag for the Blueprint APis to 1 and it pulls stuff and write it to the table... BUT i have several (maybe all?) Corp BPs in the charBlueprint table

Edit: yes.. all BPs, char and corp related are in the charBlueprints table. corpBlueprints table is empty.
Edit2: found the error and fixed it manually:

lib/Database/Corp/Blueprints.php
Quote:

$this->attributePreserveData(
$xml,
$columnDefaults,
'charBlueprints'
);

must be
Quote:

$this->attributePreserveData(
$xml,
$columnDefaults,
'corpBlueprints'
);

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Tiberius Zol
Moira.
Villore Accords
#107 - 2014-08-26 14:50:38 UTC  |  Edited by: Tiberius Zol
About the corpWalletTransaction stuff.

I truncated the table.
after it i run yapeal again and found this on the yapeal.log:

[2014-08-26 16:44:49] yapeal.WARNING: Failed to upsert data from Eve API corp/WalletTransactions for 98067338 on account 1000 {"exception":"[object] (PDOException: SQLSTATE[HY000]: General error: 1364 Field 'characterName' doesn't have a default value at /htdocs/eve/yapealneu/lib/Database/EveApiToolsTrait.php:107)"} []

after set the characterName to NULL again the table get filled again.. but with characterID and characterName both NULL

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Dragonaire
Here there be Dragons
#108 - 2014-08-26 17:57:03 UTC
Tiberius Zol wrote:
just for your information: i set the isActive flag for the Blueprint APis to 1 and it pulls stuff and write it to the table... BUT i have several (maybe all?) Corp BPs in the charBlueprint table

Edit: yes.. all BPs, char and corp related are in the charBlueprints table. corpBlueprints table is empty.
Edit2: found the error and fixed it manually:

lib/Database/Corp/Blueprints.php
Quote:

$this->attributePreserveData(
$xml,
$columnDefaults,
'charBlueprints'
);

must be
Quote:

$this->attributePreserveData(
$xml,
$columnDefaults,
'corpBlueprints'
);

https://github.com/Dragonrun1/yapeal/issues/37 Fixed. Sorry thought I'd made change before I pushed.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Dragonaire
Here there be Dragons
#109 - 2014-08-26 22:02:23 UTC
Tiberius Zol wrote:
About the corpWalletTransaction stuff.

I truncated the table.
after it i run yapeal again and found this on the yapeal.log:

[2014-08-26 16:44:49] yapeal.WARNING: Failed to upsert data from Eve API corp/WalletTransactions for 98067338 on account 1000 {"exception":"[object] (PDOException: SQLSTATE[HY000]: General error: 1364 Field 'characterName' doesn't have a default value at /htdocs/eve/yapealneu/lib/Database/EveApiToolsTrait.php:107)"} []

after set the characterName to NULL again the table get filled again.. but with characterID and characterName both NULL

https://github.com/Dragonrun1/yapeal/issues/38 Fixed.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Tiberius Zol
Moira.
Villore Accords
#110 - 2014-08-27 06:47:11 UTC
Good Job. Thanks for fixing. :-)

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Legedric Striker
DRUCKWELLE Evolution
#111 - 2014-08-27 11:22:24 UTC  |  Edited by: Legedric Striker
Any hint on what I am doing wrong when my yapeal.log get's several GB big in size although I left the bufferSize at 25 in the yapeal.yaml config file?

In addition I am getting a strange exception for a single character:

Quote:


[2014-08-27 12:04:05] yapeal.INFO: DELETE FROM "d01b51d3"."yap_charCorporationTitles" WHERE "ownerID"= '93959505' [] []
[2014-08-27 12:04:05] yapeal.INFO: Have 2 row(s) to upsert into charCorporationTitles table [] []
[2014-08-27 12:04:05] yapeal.INFO: INSERT INTO "d01b51d3"."yap_charCorporationTitles" ("ownerID","titleID","titleName") VALUES (?,?,?),... ON DUPLICATE KEY UPDATE "ownerID"=VALUES("ownerID"),"titleID"=VALUES("titleID"),"titleName"=VALUES("titleName") [] []
[2014-08-27 12:04:05] yapeal.DEBUG: 93959505,128,miner,93959505,256,Ratsuväki [] []
[2014-08-27 12:04:05] yapeal.WARNING: Failed to upsert data from Eve API char/CharacterSheet for 93959505 {"exception":"[object] (PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\\xC3\\xA4ki' for column 'titleName' at row 2 at /www/htdocs/w0123f51/_libext/vendor/yapeal/yapeal/lib/Database/EveApiToolsTrait.php:107)"} []




The following titles may be found within the xml cache file:

Quote:

*corporationTitles key="titleID" columns="titleID,titleName"*
*row titleID="128" titleName="miner" /*
*row titleID="256" titleName="Ratsuväki" /*
*/corporationTitles*


The titleName seems to block the character from ebing properly updated as the whole characterSheet is missing from the database table although it is mentioned in the yapeal logfile some lines above the exception.

Looks like a problem with special characters for me...

EVE-Skillplan.net - Plan your pilot skill training online on PC, Mac, tablet or smartphone!

Dragonaire
Here there be Dragons
#112 - 2014-08-27 16:00:25 UTC  |  Edited by: Dragonaire
Legedric Striker- You might want to read how the bufferSize works in the FingersCrossedHandler.

https://github.com/Seldaek/monolog#wrappers--special-handlers

It doesn't really limit the log overall size only how many lines it goes back in it's internal held log from when something triggers it. Fixing your other issue should keep it from writing anything to you logs which probably will help keep them from growing like they have been.Blink

The CorporationRolesAt* tables in the database are set to only allow for ASCII characters since they are fixed by CCP but titles are done by players so it should allow all normal UTF-8 characters. It was an oversight on my part about the difference and I'll try to push out an update that should fix it for you today or tomorrow. If you want to try it now just change the charCorporationTitles table charset from ASCII to utf8 with utf8_unicode_ci collate and you should see the warnings go away.

On another note some of you might have noticed Yapeal does NOT seem to be remembering which updates it has done so reapplies them all when you run 'yc D:U'. There's really nothing wrong with this other than it can be slower and it really shouldn't be repeating something it already did. I think it has to do with a last minute change I made to updating the utilDatabaseVersion table but still tracking it down so look for a fix for this as well in the next day or two.

There also a bit of a issue with the corp/MemberTracking stuff which I seem to have a working fix for. I expect to push out sometime later today to fix it. I may wait and do all the fixes together or break them up into several so just keep watching for them.

As always thank you for using Yapeal, Dragonaire.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Legedric Striker
DRUCKWELLE Evolution
#113 - 2014-08-27 16:37:21 UTC
Thanks, I changed the table collation to utf8_unicode_ci but the exception is still being thrown and so the title gets rejected.

EVE-Skillplan.net - Plan your pilot skill training online on PC, Mac, tablet or smartphone!

Dragonaire
Here there be Dragons
#114 - 2014-08-28 15:29:36 UTC
Try changing it directly on the titleName column because changing it just on the table after the table is created doesn't always update existing columns

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Legedric Striker
DRUCKWELLE Evolution
#115 - 2014-08-28 16:31:29 UTC
Thanks, that worked! I should have come up with that by myself Blink

EVE-Skillplan.net - Plan your pilot skill training online on PC, Mac, tablet or smartphone!

Dragonaire
Here there be Dragons
#116 - 2014-08-28 21:03:03 UTC
Okay think I've resolved all the issues I talking about in https://forums.eveonline.com/default.aspx?g=posts&m=4958262#post4958262 above. Also found another couple things and fixed them in the tables hopefully before anyone had run into them without realizing. Updating is now working as intended so applying the updates should be more streamlined going forward.

Hopefully with these fixes there will be less issues coming up and I can start spend more of my time on adding some of the missing APIs again but I think its important that the current APIs be as bug free as possible so keep the reports coming.

Resolved issues in last two days:

#37 corp/Blueprints using wrong table
#38 corp/WalletTransactions not setting defaults for characterID and characterName
#39 XSD for eve/CharacterInfo does NOT understand new corporationName field.
#40 charCorporationTitles table allows only ASCII character titles
#41 IndustryJobs tables installerName columns to short
#42 yc Database:Update unnecessarily reapplies updates

Thanks for using Yapeal, Dragonaire.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Tesla Ming Chent-Shi
Strategic Exploration and Development Corp
Silent Company
#117 - 2014-08-28 22:33:04 UTC
Would it be useful to make a wordpress plugin fully utilizing this library? If so, let me know and I'll design one.
Dragonaire
Here there be Dragons
#118 - 2014-08-28 22:53:02 UTC
Tesla Ming Chent-Shi - There's probably some people that would really find that useful. Like with any project that uses Yapeal I'd be more than happy to help you figure out any missing details on how it works etc. I really don't know much about WP but I'm wondering how you'd handle the background automatic updating feature Yapeal uses or if you'd more be doing it as a one shot on a per page basis? I probably would have some other questions about it but I'll wait and let's see how much interest people have in the idea and what they might like to see etc.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Tesla Ming Chent-Shi
Strategic Exploration and Development Corp
Silent Company
#119 - 2014-08-28 23:13:02 UTC
I'm developing a wordpress project that will need your library, so like you say depending on response I'll be happy to do it.

It could easily support every major feature out of the box...really all we're attempting to do is hook basic functionality into wordpress and give it some good markup.

Feel free to message me if you feel there is potential and we can collaborate.
Tiberius Zol
Moira.
Villore Accords
#120 - 2014-08-31 15:27:33 UTC  |  Edited by: Tiberius Zol
Guys... I try to import some of the old tabledata in the new tables. Some stuff is easy, like wallettables, but industryJobs seems to be a bit harder, because very different tablecolumns. Does anyone tried to convert the old data to the new table? I need the right mapping for it. Maybe some of you guys can help me here.

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de