#2307 closed Bug/Fehler (fixed)
Error wenn modified API nicht erreichbar
| Reported by: | noRiddle | Owned by: | somebody |
|---|---|---|---|
| Priority: | hoch | Milestone: | modified-shop-2.0.8.0 |
| Component: | Shop | Version: | 2.0.7.2 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: |
Description
Dieses Warning
Could not reach external host: modified/version/install/. Exit with Status: 0 in File: PATH/includes/classes/modified_api.php on Line: 159
führt zu einem Error
Cannot access offset of type string on string in File: PATH/inc/check_version_update.inc.php on Line: 53
Das sollte behoben werden, denn die Nicht-Erreichbarkeit der modified-API darf nicht zu einem Error führen.
Kommt in den letzten Tagen öfter vor.
Dabei stellt sich mir auch die Frage ob wirklich bei jedem Seitenaufruf im Backend (wo die /includes/header.php includiert ist) der Versions-Check gemacht werden muß.
Ein Skript welches z.B. eine Import-Routine mit Browser-Reloads (Timeout vermeiden) durchführt fragt so ständig die modified-API ab.
(Ich weiß, kann mir eine eigene header.php bauen, aber die Frage bleibt zur Diskussion.)
In Zusammenhang mit dem Thema stellt sich auch die Frage warum der get_newsfeed() auf jeder Seite gemacht wird. Die header.php wird ja nun auf so gut wie jeder Backend-Seite includiert.
Gruß,
noRiddle
Attachments (0)
Change History (9)
comment:1 by , 3 years ago
| Milestone: | → modified-shop-2.0.8.0 |
|---|
comment:2 by , 3 years ago
comment:4 by , 3 years ago
Passt hier hin oder neues Ticket ?
Wenn die modified-API nicht erreichbar ist führt das vergebliche check_version_update() zu Warnings.
Z.B. wegen leerem $update_array
in /includes/header.php
oder in /templates/tpl_modified_responsive/source/boxes/admin.php,
wo man anstatt
($update_array['total'] > 0 ? $update_array['total'] : '')
um das abzufangen das abfragen sollte
(isset($update_array['total']) && $update_array['total'] > 0 ? $update_array['total'] : '')
Gruß,
noRiddle
comment:5 by , 3 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
Ich denke das passt hier hin, daher öffne ich das Ticket nochmal.
comment:7 by , 2 years ago
Sind damit auch die warnings für Shopvote behoben, wenn die modified api nicht erreichbar ist?
comment:8 by , 2 years ago
Die Warnings sind bewusst ausgelöst und diese werden nicht nur geschrieben, wenn es wirklcih mal vorkommen sollte, dass unsere API nicht erreichbar ist, was extrem selten bis gar nicht vorkommt.
Die Warnings werden auch geschrieben, wenn die API verwendet wird um externe Dienste wie Shopvote abzufragen. Da steht dann auch, dass wir nicht erreichbar wären, was aber nicht der Fall ist, sondern dass Shopvote nicht erreichbar war.
Evtl. ändere ich da nochmals den Logeintrag.
comment:9 by , 2 years ago
Danke für die Klarstellung!
Im Moment sieht die Meldung so aus und ich hätte auch gedacht, dass es an der modified api liegt:
[2023-07-24 03:42:26] [warning] [modified] [pid:1073] WARNING found for URL: /meineProduktUrl::75.html {} {}
[2023-07-24 03:42:26] [warning] [modified] [pid:1073] Could not reach external host: product-reviews/v2/reviews?days=2&sd=false&sku=75. Exit with Status: 0 in File: /includes/classes/modified_api.php on Line: 159 {} {}
[2023-07-24 03:42:26] [warning] [modified] [pid:1073] Backtrace #0 - /includes/external/shopvote/shopvote_import.php called at Line 79 {} {}
[2023-07-24 03:42:26] [warning] [modified] [pid:1073] Backtrace #1 - /includes/extra/application_top/application_top_end/70_shopvote.php called at Line 37 {} {}
[2023-07-24 03:42:26] [warning] [modified] [pid:1073] Backtrace #2 - /includes/application_top.php called at Line 341 {} {}
[2023-07-24 03:42:26] [warning] [modified] [pid:1073] Backtrace #3 - /product_info.php called at Line 25 {} {}

Der Newsfeed wird nur 1x am Tag abgerufen. Das wird in der Funktion get_newsfeed.inc.php geregelt.