Loading...
 
Skip to main content

Crash with blank screen at starting for new users (unknown) visitor with 8.1

Status
Closed
Subject
Crash with blank screen at starting for new users (unknown) visitor with 8.1
Version
8.x
Category
  • Error
  • Regression
Resolution status
Out of Date
Submitted by
Bernard TREMBLAY
Lastmod by
Ushindi Gedeon
Rating
(0)
Description

Main bug.

A new user can't at all connect and get a blank screen.
This without crash.

If the user have an analyser he will find that tiki has sent this code

The page sent content
Copy to clipboard
<html><header</header><body></body></html>


Files
  1. User Prefs
  2. User Prefs
Solution

Note : I had redacted this before a commit but I used the "close button" of "code" plugin which have cut off a large part of my text, and I had a net cutoff just after. So I reproduce here (main page) my solution (which have been detailed in comments). Later Chealer got on the subject.

Probably and surely avoid that $_SESSION'attributes' should be not null, but not only in my opinion.

But as the developer writing, when user is null (new one) the instruction

The actual instruction
Copy to clipboard
array_merge($prefs, $_SESSION['attributes'])


has the aim to keep $prefs values even $_SESSION'attributes' is empty (first start)

The fact that array_merge($prefs, $_SESSION'attributes') returns "null" for any reason (bug in SESSION old DATA etc...), is always an error (if an array is null the instruction array_merge returns an array null in any case).

So the right instruction which answers to the developer aim is (because $prefs can't be null)

The suitable instruction in any case
Copy to clipboard
if (! is_null ($_SESSION['attributes']))array_merge($prefs, $_SESSION['attributes']);

I commit this changes the 19th which has been immediately rewind to be sure that the bug remains...
I don't understand Chealer decision(see the comments).

Waiting for Chealer solution and remarks, may be I have not seen something.

To go farther... I let Chealer go on.

Workaround

Spent near 12hours to find that in user_prefs.php if the data come from another version the $_SESSION'attributes' is a null area.
when merged with prefs default we get null prefs which automatically crashes the execution.

Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
4051
Created
Saturday 19 November, 2011 01:56:20 UTC
by Bernard TREMBLAY
LastModif
Friday 03 July, 2026 10:24:48 UTC


Show PHP error messages