biow0lf / evedev-kb

Automatically exported from code.google.com/p/evedev-kb
1 stars 0 forks source link

Getting error when doing API import and manual kill post #214

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When going to Admin -> API Killlog and click on "Import mails" I get this:

Database error: You have an error in your SQL syntax; check the manual that 
corresponds to your MySQL server version for the right syntax to use near 'and 
d.attributeID in (137,602)' at line 5
SQL: select itt_slot from kb3_item_types inner join kb3_dgmtypeattributes d 
where itt_id = d.value and d.typeID = and d.attributeID in (137,602);
ERROR [256] SQL error (You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
'and d.attributeID in (137,602)' at line 5
Error on line 46 in file /home/.../kb/common/includes/class.dbnormalquery.php
PHP 5.2.17 (Linux), EDK 4.0.4 (Crucible)
File: /home/.../kb/common/includes/class.dbnormalquery.php, line: 46, function: 
trigger_error
File: /home/.../kb/common/includes/class.item.php, line: 152, class: 
DBNormalQuery, function: execute
File: /home/.../kb/common/includes/class.idfeed.php, line: 806, class: Item, 
function: getSlot
File: /home/.../kb/common/includes/class.idfeed.php, line: 556, class: IDFeed, 
function: processItem
File: /home/.../kb/common/includes/class.idfeed.php, line: 485, class: IDFeed, 
function: processKill
File: /home/.../kb/common/includes/class.idfeed.php, line: 138, class: IDFeed, 
function: processFeed
File: /home/.../kb/common/includes/api/class.killlog.php, line: 128, class: 
IDFeed, function: read
File: /home/.../kb/common/admin/admin_api.php, line: 118, class: API_KillLog, 
function: Import
File: /home/.../kb/common/index.php, line: 293, function: include
File: /home/.../kb/index.php, line: 27, function: include

And when I try and manually post the kill mail (that hasn't been pulled by the 
API) I get this:

Killmail is malformed.
Error: Item not found. The text leading to this error was: "Drone Damage 
Amplifier II"
Error: Item not found. The text leading to this error was: "EM Ward Amplifier 
II"
Error: Item not found. The text leading to this error was: "Adaptive 
Invulnerability Field II"
Error: Item not found. The text leading to this error was: "Scourge Cruise 
Missile"
Error: Item not found. The text leading to this error was: "Thermic Dissipation 
Amplifier II"
Error: Item not found. The text leading to this error was: "Scourge Cruise 
Missile"

Code [This Killboard is Version 4.0.4]
Database [This Killboard is Database Version 1.2.1]
Graphics
 GD is available.
 FreeType support is enabled
 Cache directory is writeable
Connectivity
 allow_url_fopen is available.
 Socket Connect is available.
 OpenSSL module is installed.
 HTTPS wrapper is installed.
Server
 PHP version: 5.2.17 
 MYSQL version: 5

What is the url of a page where the error occurs or has occurred?
kb/?a=admin_api
kb/?a=post

Please provide any additional information below.
As far as I can tell, maybe my database isn't set up correctly? It would be 
awesome if I could get this fixed without having to rebuild anything. 

I have tried clearing all the caches and reinstalling the db.

When I go to "verify files" I get a few invalid files:
./.htaccess (Expected 1c910af7d8424702848da105757e4da55feab0b8, got 
9ad5a980896feb3113820f20e80722c860423941)
./common/pclzip/gnu-lgpl.txt (Expected 
8f1a637d2e2ed1bdb9eb01a7dccb5c12cc0557e1, got 
e60c2e780886f95df9c9ee36992b8edabec00bcc)
./common/pclzip/readme.txt (Expected 4f0208bcc8a7c55e11824f9757e4db606bdb5ac4, 
got 8179e1b579679b3c6c2c8366edb0910f0992b2ad)
./cron/README.txt (Expected e432f35f6756eda55bf5483a538422c26ba45341, got 
5c9f8cd4d873328f6c90e41f13c9b6d285393bff)
./doxygen.txt (Expected f7c84645de9744dc41a48a1b46ab284ebebb6bf1, got 
106278437e9061f926016a179cdff919cadc4ae3)
./gpl.txt (Expected e2f1624dee9fc2dfda283ce78e13e68d2545de88, got 
e0711802d967655d3c98609c0bb5783e4a7b9deb)
./mods/signature_generator/sig_list.tpl (Expected 
e891aedd59ce685eb4d552a4bb03addf3497dece, got 
e7d6307ebac5b8bd67be89d654f36d16b0699bac)
./packages/database/contents.xml (Expected 
3e34101aff973531090c94bdeca7171362d22142, got 
cda2e56ae31fd169158d109d775175ac9841b221)
./packages/database/kb3_log/table.xml (Expected 
849406a655e5d80cb48eba49167947d171d734ad, got 
e614f59a7d1cb5c87ced847c17824fc668321808)
./packages/database/kb3_sum_alliance/table.xml (Expected 
c30929b83c7931363d2ff56b12752730ba56e9b8, got 
f7d719bb77bceb0e1e197b8b77ba47ea06133cfc)
./packages/database/kb3_sum_corp/table.xml (Expected 
adc2caeb39365e3f88154a1f5a9f9271fa690e2e, got 
a9b26c8c636afec94b0eaa394263207a992e05d8)
./packages/database/kb3_sum_pilot/table.xml (Expected 
d0895b51f5a97732d64049c100f586bcb5912459, got 
374b926b477a6499eb90429c11977830fcede075)
./README.txt (Expected 1361f2c655dac21b7a11945e55c875ea50489597, got 
c0bf440ab0d9e9d505e4d12d99e86f7ddeb5d28e)
./update/update.css (Expected d8fde7528869050ec644645e2a9d1152c45e3d48, got 
e1b566c2390c7650a37d5a505a91913535dfac5e)
./update/update.tpl (Expected cb3a9504dbdafe37b5b836e0eef3a93da778d472, got 
1f6b43cc8f57150429e628a87e4bc98929a52f71)
./update/update_login.tpl (Expected d12cd89702a6ed2bdebcb2fec5f835041a10660c, 
got 6bd8803d54af706d408a3a83086b99c8d323bd8c)

I left out all of the ./themes/* ones. 

If you need any more info, I'll be happy to supply. 

Thanks.

Original issue reported on code.google.com by Nathanie...@gmail.com on 8 Jun 2012 at 10:32

GoogleCodeExporter commented 9 years ago
Getting the same error when importing a kill from feed syndication.

Original comment by patrick....@gmail.com on 14 Jun 2012 at 5:32

GoogleCodeExporter commented 9 years ago
As a (temporary) fix I changed
common/includes/class.item.php, line 145

from

if ($this->row_['itt_slot'] == 0) {

into

if ($this->row_['itt_slot'] == 0 && !empty($this->row_['typeID'])) {

and with that change it works.

Original comment by patrick....@gmail.com on 14 Jun 2012 at 5:41

GoogleCodeExporter commented 9 years ago
I tried this fix, but I still get the error. 

Original comment by Nathanie...@gmail.com on 14 Jun 2012 at 6:19

GoogleCodeExporter commented 9 years ago
yep, i can verify this bug ...

Original comment by dma2...@t-online.de on 4 Jul 2012 at 6:32

Attachments:

GoogleCodeExporter commented 9 years ago
Workaround: set last kill to 2, then pull.

Original comment by customde...@gmail.com on 14 Aug 2012 at 6:49

GoogleCodeExporter commented 9 years ago
the error is caused by all the new items - EvE ID KB is extremely buggy, 
receiving a (yet) unknown typeID via API will result in an empty $typeID - var 
in cron_feed.php. This - in return - results in a faulty SQL-statement hence 
stop the whole script.

There are no database-updates, i guess eve-is dead now.
I will work on a database-update which fixes this ... i will also refuse to 
pull new KB-updates if they ever are created, this software has proven to be 
extremely unstable and unreliable in the past ... i will fix all the errors in 
our local version over time and thats about it.

Original comment by dma2...@t-online.de on 1 Sep 2012 at 12:17

GoogleCodeExporter commented 9 years ago
the solution was quite simple : delete kb3_invtypes, get your latest 
EvE-DB-dump from here : http://evedump.icyone.net/, import it and create a view 
in your killboard-database, named kb3_invtypes - the statement which does it : 
select `EvE_static_dump`.`invTypes`.`typeID` AS 
`typeID`,`EvE_static_dump`.`invTypes`.`groupID` AS 
`groupID`,`EvE_static_dump`.`invTypes`.`typeName` AS 
`typeName`,`EvE_static_dump`.`invTypes`.`description` AS `description`,(select 
`EvE_static_dump`.`eveIcons`.`iconFile` from `EvE_static_dump`.`eveIcons` where 
(`EvE_static_dump`.`eveIcons`.`iconID` = 
`EvE_static_dump`.`invTypes`.`iconID`)) AS 
`icon`,`EvE_static_dump`.`invTypes`.`mass` AS 
`mass`,`EvE_static_dump`.`invTypes`.`volume` AS 
`volume`,`EvE_static_dump`.`invTypes`.`capacity` AS 
`capacity`,`EvE_static_dump`.`invTypes`.`portionSize` AS 
`portionSize`,`EvE_static_dump`.`invTypes`.`raceID` AS 
`raceID`,`EvE_static_dump`.`invTypes`.`basePrice` AS 
`basePrice`,`EvE_static_dump`.`invTypes`.`marketGroupID` AS `marketGroupID` 
from `EvE_static_dump`.`invTypes`

--> replace "EvE_static_dump" with the name of your imported eve-DB. Have fun.

Original comment by dma2...@t-online.de on 1 Sep 2012 at 1:10

GoogleCodeExporter commented 9 years ago
oh and you will need to keep your icons up to date, of course ...
http://wiki.eve-id.net/CCP_Image_Dump
or
http://community.eveonline.com/community/toolkit.asp

Original comment by dma2...@t-online.de on 1 Sep 2012 at 1:12

GoogleCodeExporter commented 9 years ago
Hi, i have just had the exact same error.  Managed to import the DB dump over 
the existing database but when i try running the statement it says there is a 
syntax error.  Any idea?

Original comment by stumarkt...@googlemail.com on 7 Oct 2012 at 9:31

GoogleCodeExporter commented 9 years ago
mnost certainly there is a typo in your statement.

Original comment by dma2...@t-online.de on 7 Oct 2012 at 9:34

GoogleCodeExporter commented 9 years ago
Can you identify what the typo is? I don't see it.

Original comment by vladinator on 7 Oct 2012 at 9:50

GoogleCodeExporter commented 9 years ago
who are you talking to?

Original comment by dma2...@t-online.de on 7 Oct 2012 at 9:56

GoogleCodeExporter commented 9 years ago
You...

Original comment by vladinator on 7 Oct 2012 at 10:26

GoogleCodeExporter commented 9 years ago
... and why are you acting like you're a different person? Furthermore : how 
should i be able to debug an unknown statement? Are you confused of some sort?

Original comment by dma2...@t-online.de on 7 Oct 2012 at 10:27

GoogleCodeExporter commented 9 years ago
#1, I am a different person.

#2, since you said there was an error, I thought you might have spotted it. :-)

Original comment by vladinator on 7 Oct 2012 at 10:29

GoogleCodeExporter commented 9 years ago
this does not answer either of my questions.

Original comment by dma2...@t-online.de on 7 Oct 2012 at 10:42

GoogleCodeExporter commented 9 years ago
and #1 doesnt make any sense, contextually ... you're definitely confused.

Original comment by dma2...@t-online.de on 7 Oct 2012 at 10:43

GoogleCodeExporter commented 9 years ago
Patrick fixed my issue. 

Original comment by jmm...@gmail.com on 22 Nov 2012 at 12:03

GoogleCodeExporter commented 9 years ago
i had quite a refreshing shower just now.

Original comment by dma2...@t-online.de on 22 Nov 2012 at 7:55

GoogleCodeExporter commented 9 years ago

Original comment by idun@theexecutioners.org on 16 Jan 2013 at 8:47

GoogleCodeExporter commented 9 years ago
Thank you #7 
that fixed my issue dont know why I did not think of that myself

Original comment by xia...@gmail.com on 30 May 2013 at 9:51

GoogleCodeExporter commented 9 years ago
Dont worry - its really counter-intuitive and a prime example of horrible 
code-quality, it took me several days to discover it, you're certainly not 
alone ... Most people will reinstall the whole KB instead, though

Original comment by dma2...@t-online.de on 3 Jun 2013 at 1:59