Seite 1 von 1

SQL ERROR [ mysql4 ] [1366]

Verfasst: 28.07.2018 17:38
von Grete
Hallo zusammen,
ich wollte mich heute in meinem Forum als Testuser registrieren und bekomme nach Abschluss folgende Fehlermeldung:
Allgemeiner Fehler
SQL ERROR [ mysql4 ]

Incorrect integer value: '' for column 'user_rt_sort_start_time' at row 1 [1366]

Beim Laden der Seite ist ein SQL-Fehler aufgetreten. Bitte kontaktiere die Board-Administration, falls dieses Problem fortlaufend auftritt.
Ich würde mich über eure Hilfe sehr freuen, danke.

Re: SQL ERROR [ mysql4 ] [1366]

Verfasst: 28.07.2018 18:30
von Dr.Death
Hi,

du hast wahrscheinlich mal die Extension "PayBas/RecentTopics" eingebaut gehabt und nicht korrekt deinstalliert...... nun sind Datenbank Reste übrig oder Code Fragmente, die die Registrierung behindern.

Das benannte Tabellenfeld user_rt_sort_start_time ist nicht Bestandteil eines frischen phpBB Forums.

Re: SQL ERROR [ mysql4 ] [1366]

Verfasst: 28.07.2018 20:12
von Grete
Hallo,
ich hatte vor einer Weile die ext. Recent Topics von 2.2.1 auf 2.2.8 aktualisiert. Mit der alten Version war noch alles i.O. Wenn ich jetzt Recent Topics Deaktivieren/Arbeitsdaten löschen geht es mit den registrieren wieder. Beim erneuten Aktivieren der Recent Topics selbe Fehlermeldung. Habe ich denn noch eine andere Möglichkeit die ext. Recent Topics zu deinstallieren?

Re: SQL ERROR [ mysql4 ] [1366]

Verfasst: 28.07.2018 21:41
von Dr.Death
Version 2.2.8 ist noch nicht für den Produktiv-Einsatz vorgesehen.

Benutze bitte 2.2.7, wenn Du ein phpBB 3.2 Forum betreibst:

https://www.phpbb.com/customise/db/exte ... _topics_2/

Re: SQL ERROR [ mysql4 ] [1366]

Verfasst: 28.07.2018 22:54
von Grete
Danke für deine Hilfe. Ich habe die v.2.2.7 jetzt installiert und das registrieren funktioniert wieder. Wenn ich in dieser Version die Anzahl Aktuelle Themen z.B. auf 8 stelle werden nur 7 angezeigt und wenn man die nächste Seitenzahlen benutzen möchte wird immer nur die erste Seite angezeigt, auch nach den User Einstellungen zurücksetzen.

Re: SQL ERROR [ mysql4 ] [1366]

Verfasst: 29.07.2018 08:32
von Dr.Death
Die Extension ist leider nicht ganz Bug Frei.....

Siehe z.B. hier: https://www.phpbb.com/customise/db/exte ... pic/191836

Re: SQL ERROR [ mysql4 ] [1366]

Verfasst: 29.07.2018 10:24
von Grete
Danke für deine Hilfe. Ich habe das mal in der v.2.2.7 gesucht: /core/recenttopics.php

Code: Alles auswählen

				/**
				 * Event to modify the SQL query before the allowed topics list data is retrieved
				 *
				 * @event paybas.recenttopics.sql_pull_topics_list
				 * @var   array    sql_array        The SQL array
				 * @since 2.0.4
				 */
				$vars = array('sql_array');
				extract($this->dispatcher->trigger_event('paybas.recenttopics.sql_pull_topics_list', compact($vars)));

				$sql = $this->db->sql_build_query('SELECT', $sql_array);
				$result = $this->db->sql_query_limit($sql, $total_topics_limit);

				if ($result != null)
				{
					$rtstart = min((int) $result->num_rows - 1 , $rtstart);
				}
				else
				{
					$rtstart = 0;
				}

				while ($row = $this->db->sql_fetchrow($result))
				{
					$topics_count++;
					if (($topics_count > $rtstart) && ($topics_count <= ($rtstart + $topics_per_page)))
					{
						$this->topic_list[] = $row['topic_id'];

						$rowset[$row['topic_id']] = $row;
						if (!isset($this->forums[$row['forum_id']]) && $this->user->data['is_registered'] && $this->config['load_db_lastread'])
						{
							$this->forums[$row['forum_id']]['mark_time'] = $row['f_mark_time'];
						}
						$this->forums[$row['forum_id']]['topic_list'][] = $row['topic_id'];
						$this->forums[$row['forum_id']]['rowset'][$row['topic_id']] = & $rowset[$row['topic_id']];

						if ($row['icon_id'])
						{
							$this->obtain_icons = true;
						}

					}
				}
				$this->db->sql_freeresult($result);
			}

			return $topics_count;

		}

und mit folgenden Block aus der v.2.2.8 geändert:

Code: Alles auswählen

				/**
				 * Event to modify the SQL query before the allowed topics list data is retrieved
				 *
				 * @event paybas.recenttopics.sql_pull_topics_list
				 * @var   array    sql_array        The SQL array
				 * @since 2.0.4
				 */
				$vars = array('sql_array');
				extract($this->dispatcher->trigger_event('paybas.recenttopics.sql_pull_topics_list', compact($vars)));

				//count topics
				$count_sql_array = $sql_array;
				$count_sql_array['SELECT'] = 'COUNT(t.topic_id) as topic_count';
				unset($count_sql_array['ORDER_BY']);
				$sql = $this->db->sql_build_query('SELECT', $count_sql_array);
				$result = $this->db->sql_query($sql);
				$num_rows = (int) $this->db->sql_fetchfield('topic_count', $result);
				$this->db->sql_freeresult($result);

				//load topics list
				$sql = $this->db->sql_build_query('SELECT', $sql_array);
				$result = $this->db->sql_query_limit($sql, $total_topics_limit);

				if ($result != null)
				{
					$rtstart = min($num_rows - 1 , $rtstart);
				}
				else
				{
					$rtstart = 0;
				}

				while ($row = $this->db->sql_fetchrow($result))
				{
					$topics_count++;
					if (($topics_count > $rtstart) && ($topics_count <= ($rtstart + $topics_per_page)))
					{
						$this->topic_list[] = $row['topic_id'];

						$rowset[$row['topic_id']] = $row;
						if (!isset($this->forums[$row['forum_id']]) && $this->user->data['is_registered'] && $this->config['load_db_lastread'])
						{
							$this->forums[$row['forum_id']]['mark_time'] = $row['f_mark_time'];
						}
						$this->forums[$row['forum_id']]['topic_list'][] = $row['topic_id'];
						$this->forums[$row['forum_id']]['rowset'][$row['topic_id']] = & $rowset[$row['topic_id']];

						if ($row['icon_id'])
						{
							$this->obtain_icons = true;
						}

					}
				}
				$this->db->sql_freeresult($result);
			}

			return $topics_count;

		}