WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

Du bist nicht angemeldet.

#1 28.02.2024 23:59:33

giz
Mitglied

[erledigt] Speichern/Ändern nicht mehr möglich

Hallo zusammen!

Ich kann leider nicht sagen, seit wann das ist aber ich habe das letzte Mal im Dezember 2023 in NWI einen Beitrag gepostet; da war alles ok. Anfang Februar 24 installierte ich die Version 5.0.25 (Update), hatte aber nicht weiter getestet, ob alles ok ist.

Heute wollte ich erst bei einem alten Beitrag das Datum ändern, um ihn nach vorne zu pushen. Nach "Speichern" kam die Meldung "Beitrag gespeichert", aber nach autom. Neuladen der Seite war diese wieder leer. Auch das Erstellen neuer Beiträge zeigt das gleiche Verhalten.
d.h. es wird weder ein geänderter Beitrag, noch ein neu erstellter Beitrag gespeichert und auch nicht angezeigt.

NWI 5.0.25
WBCE 1.6.1
PHP 8.2.13

Errorlog:

2024-02-28T21:37:35+00:00 [Visitor Request] https://www.tld/modules/news_img/save_post.php
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/save_post.php:[113] from /modules/news_img/save_post.php:[113] WBCE_Error->scriptError "Trying to access array offset on value of type null"
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[875] from /modules/news_img/save_post.php:[153] mod_nwi_img_upload "Trying to access array offset on value of type null"
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[876] from /modules/news_img/save_post.php:[153] mod_nwi_img_upload "Undefined array key "page_id""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[878] from /modules/news_img/save_post.php:[153] mod_nwi_img_upload "Trying to access array offset on value of type null"
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[879] from /modules/news_img/save_post.php:[153] mod_nwi_img_upload "Trying to access array offset on value of type null"
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[882] from /modules/news_img/save_post.php:[153] mod_nwi_img_upload "Trying to access array offset on value of type null"
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[883] from /modules/news_img/save_post.php:[153] mod_nwi_img_upload "Trying to access array offset on value of type null"
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1393] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Trying to access array offset on value of type null"
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1405] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Trying to access array offset on value of type null"
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1413] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "published_when""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1413] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "published_until""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1428] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "image""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1437] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "link""
2024-02-28T21:37:35+00:00 [Deprecated] /framework/class.wb.php:[487] from /framework/functions.php:[786] Wb->page_link "strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated"
2024-02-28T21:37:35+00:00 [Deprecated] /framework/class.wb.php:[487] from /framework/functions.php:[786] Wb->page_link "substr(): Passing null to parameter #1 ($string) of type string is deprecated"
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1457] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "published_when""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1461] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "published_when""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1461] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "posted_when""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1465] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "posted_when""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1466] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "posted_when""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1468] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "published_when""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1469] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "published_when""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1471] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "published_when""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1472] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "published_until""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1507] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "group_id""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1520] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "image""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1526] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "posted_by""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1527] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "posted_by""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[1528] from /modules/news_img/functions.inc.php:[415] mod_nwi_post_get "Undefined array key "posted_by""
2024-02-28T21:37:35+00:00 [Warning] /modules/news_img/functions.inc.php:[416] from /modules/news_img/save_post.php:[153] mod_nwi_img_upload "Undefined array key "section_id""
2024-02-28T21:37:35+00:00 [Deprecated] /modules/news_img/functions.inc.php:[1759] from /modules/news_img/functions.inc.php:[429] mod_nwi_get_sizes "substr_count(): Passing null to parameter #1 ($haystack) of type string is deprecated"
2024-02-28T21:37:35+00:00 [Deprecated] /modules/news_img/functions.inc.php:[1762] from /modules/news_img/functions.inc.php:[429] mod_nwi_get_sizes "substr_count(): Passing null to parameter #1 ($haystack) of type string is deprecated" 

Grüsse

Beitrag geändert von florian (01.03.2024 14:09:34)


WBCE 1.6.1 - Fraggy 2.7.1 - PHP 8.2.13- All-inkl
Ein Leben ohne Hund ist möglich, aber sinnlos

Offline

#2 29.02.2024 01:00:40

florian
Administrator

Re: [erledigt] Speichern/Ändern nicht mehr möglich

Kann ich hier erstmal nicht reproduzieren, scheint also kein grundsätzlicher Fehler zu sein.
Offenbar gibt es da irgendein Problem mit $post_id.
Sind da noch andere Abschnitte auf der NWI-Seite?

Zur Ursachensuche:
1. Füge bitte mal in der /modules/news_img/save_post.php nach Zeile 27 ein:

echo '<div style="text-align:center">'.$post_id.'</div>';

2 Setze bei Grundeinstellungen bitte mal die Anzeigedauer für Hinweise vorübergehend auf 5000.
3. Speichere einen Newsbeitrag. Oben auf der Seite mit dem "Erfolgreich"-Hinweis müsste eine Zahl stehen.
attachment.php?item=3547&download=1
Entspricht diese der Zahl, die als Tooltip in der News-Übersicht angezeigt wird?
attachment.php?item=3546&download=1

4. Schaue in die Datenbank (ggf. Admin-Tool Adminer installieren), Tabelle {deinpräfix}_mod_news_img_posts. Sieht die vom Prinzip aus so wie diese hier?
attachment.php?item=3545&download=1

Beitrag geändert von florian (29.02.2024 01:01:46)


Code allein macht nicht glücklich. Jetzt spenden!

Offline

Liked by:

mk70

#3 29.02.2024 10:19:58

giz
Mitglied

Re: [erledigt] Speichern/Ändern nicht mehr möglich

Guten Morgen,

bei mir sieht das alles auch so aus und auch die Post-ID entspricht der angelegten.

Kann es sein, dass der Server genau in der Zeit, als ich da am schreiben/speichern war, ein Problem hatte? Denn jetzt funktioniert das ohne Fehlermeldungen, so wie es soll. roll
Danke für deine Mühen und die mehr als vorbildlichen und aufwendigen Beschreibungen.... thumb_up

--

Nur in NWI Anywhere (0.3.7) werden nach wie vor (und so entstand das gestern alles erst) geänderte, bzw. mit neuem/aktuellem Datum versehene vorhandene Beiträge nicht als aktueller/neuer Beitrag angezeigt. Selbst wenn ich in der DB das Datum eines neu erstellten Beitrags dafür benutze.
Neu angelegte Beiträge funktionieren wie es soll und werden angezeigt....

Hier mal eben mein Code zur Anzeige:

Ausgabeseite:

[[getImageNewsItems?group_id_type=section_id&group_id=110&display_mode=5&max_news_items=5]] 

Group-ID/section-ID der neuen und geänderten Beiträge ist korrekt, falls diese Frage kommen sollte.

Droplet:

if (! file_exists(WB_PATH . '/modules/news_img_anywhere/droplet/nia_droplet.php')) return;
 include(WB_PATH . '/modules/news_img_anywhere/droplet/nia_droplet.php');
 return $output;

Ausgabe display_mode=5:

<div class="mod_nia">
	<center><u><a href="/news/" class="h8">news</a></u></center>
	{% if newsItems %}
			<ul>
				{% for news in newsItems %}
					{% if news.TS_POSTED_WHEN > 0 %}
						<li>
						<h4><a href="{{ news.LINK }}">{{ news.TITLE }}</a></h4>
						<small>({{ lang.TXT_PUBLISHED_WHEN }}{{ news.TS_PUBLISHED_WHEN | date(lang.DATE_FORMAT) }})</small>
						{{ news.CONTENT_SHORT }}
							{% if news.CONTENT_LONG %}
								<a href="{{ news.LINK }}">{{ lang.TXT_READMORE }}<span class="fa fa-arrow-circle-right fa-fw" style="color:#008080; font-size:10px"></span></a>
								<hr>
							{% endif %}
						</li>
					{% endif %}
				{% endfor %}
			</ul>
	{% else %}
		{{ lang.TXT_NO_NEWS }}
	{% endif %}
</div> 

Errorlog zeigt in diesem zusammenhang nichts an, auch keine anderen fehlermeldungen.
Oder muss ich da im Beitrag oder sonst irgendwo noch irgendwelche Änderungen vornehmen, damit ein "alter" Beitrag mit neuem Datum auch als solcher erkannt/gekennzeichnet wird?


WBCE 1.6.1 - Fraggy 2.7.1 - PHP 8.2.13- All-inkl
Ein Leben ohne Hund ist möglich, aber sinnlos

Offline

#4 29.02.2024 19:45:08

florian
Administrator

Re: [erledigt] Speichern/Ändern nicht mehr möglich

Im Aufruf noch &sort_by=2 ergänzen
Im Template nicht news.TS_PUBLISHED_WHEN, sondern news.TS_POSTED_WHEN verwenden

Beitrag geändert von florian (29.02.2024 19:45:22)


Code allein macht nicht glücklich. Jetzt spenden!

Offline

Liked by:

giz

#5 01.03.2024 09:27:27

giz
Mitglied

Re: [erledigt] Speichern/Ändern nicht mehr möglich

vielen Dank für die Hilfe!
Läuft wieder perfekt.


WBCE 1.6.1 - Fraggy 2.7.1 - PHP 8.2.13- All-inkl
Ein Leben ohne Hund ist möglich, aber sinnlos

Offline

Fußzeile des Forums

up