ElkArte Community

Project Support => General ElkArte discussions => Topic started by: Spuds on December 27, 2020, 12:22:54 am

Title: ElkArte 1.1.7 Patch Testing
Post by: Spuds on December 27, 2020, 12:22:54 am
Hi Everyone,

I've updated the site to the most current 1.1.7 repo status for some early testing.

I have also prepared a preliminary patch for updating 1.1.6 <-> 1.1.7 and I'd like to ask for your help in testing.  I'm not sure what fixes/updates may remain to add to this patch so I can't say for sure its final.  @emanuele45 do you know of other open issues we need to address or ideas about the remaining ones on github for the 1.1.7 milestone.  There are a few still open.

Tests needed: install/uninstall on a clean 1.1.6 forum.

Likely there are some things that are broken so always remember some users may experience a severe allergic reaction at the injection point.  This is normal for testing!!!  Its a pretty large patch with lots of ingredients.

Hopefully it will install fine (I think I remembered all the things to update, but  creating these patches bites), worst case you'll get errors during install.  Please report them. :)
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on December 27, 2020, 12:44:38 am
Will test it soon.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Zioclive on January 03, 2021, 03:16:23 pm
I will test soon too and give some report

quick update patch installed on my test-forum no problem or errors to report
X
the forum was not a fresh 1.1.6 install but was a 1.1.5 patched to 1.1.6

very few mods on it...


http://zxbelt.altervista.org/forum/index.php
Patch 1.1.7 removed

these are my adds on
X

Finally back again on 1.1.7
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 04, 2021, 01:23:43 am
I'm getting this error now when I view a topic using postgresql

Code: [Select]
ERROR: LIMIT #,# syntax is not supported
LINE 11: LIMIT 0, 15) AS o
^
HINT: Use separate LIMIT and OFFSET clauses.
File: /var/www/html/Elkarte/sources/subs/Topic.subs.php
Line: 2198

Note: Your database version is 1.1.6.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on January 04, 2021, 01:39:50 pm
Will test it soon.
Just finished installing. So far so good.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on January 04, 2021, 03:25:13 pm
I'm getting this error now when I view a topic using postgresql
 .....
Note: Your database version is 1.1.6.[/code]
Thank you for testing and the report

I found that one while testing on 2.0 (specifically when I pulled in the 1.1.7 changes) and have fixed it on my local.  We changed from temp tables to sub selects in one area for 1.1.7 (performance) and our postgresql  translator failed to understand that and properly change the LIMIT X,Y to postgresql  LIMIT X OFFSET Y syntax.

If you could test the following which is what I did and see if it works for you.

In Db-postgresql.class.php
Code: (find) [Select]
-		$db_string = preg_replace('~\sLIMIT\s(\d+|{int:.+}),\s*(\d+|{int:.+})\s*$~i', 'LIMIT $2 OFFSET $1', $db_string);
Code: (replace) [Select]
		$db_string = preg_replace('~\sLIMIT\s(\d+|{int:.+}),\s*(\d+|{int:.+})\s*(.*)$~is', 'LIMIT $2 OFFSET $1 $3', $db_string);
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on January 04, 2021, 04:11:28 pm
Quick reply smiley (gif) images has double back slash like in here:
https://www.elkarte.net/community/smileys/default//smiley.gif

I think should be fixed in 1.1.7 if considered a bug.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 04, 2021, 06:17:39 pm
I'm getting this error now when I view a topic using postgresql
 .....
Note: Your database version is 1.1.6.[/code]
Thank you for testing and the report

I found that one while testing on 2.0 (specifically when I pulled in the 1.1.7 changes) and have fixed it on my local.  We changed from temp tables to sub selects in one area for 1.1.7 (performance) and our postgresql  translator failed to understand that and properly change the LIMIT X,Y to postgresql  LIMIT X OFFSET Y syntax.

If you could test the following which is what I did and see if it works for you.

In Db-postgresql.class.php
Code: (find) [Select]
-		$db_string = preg_replace('~\sLIMIT\s(\d+|{int:.+}),\s*(\d+|{int:.+})\s*$~i', 'LIMIT $2 OFFSET $1', $db_string);
Code: (replace) [Select]
		$db_string = preg_replace('~\sLIMIT\s(\d+|{int:.+}),\s*(\d+|{int:.+})\s*(.*)$~is', 'LIMIT $2 OFFSET $1 $3', $db_string);

That corrects the issue, I had changed the SQL but I noticed other locations where it was incorrect so stopped.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on January 04, 2021, 07:49:49 pm
Quick reply smiley (gif) images has double back slash like in here:
https://www.elkarte.net/community/smileys/default//smiley.gif

I think should be fixed in 1.1.7 if considered a bug.
I'm going to guess that's because you have a trailing '/' in the ACP smiley settings URL.   We should disallow that when its set /saved.   That does not actively fix sites with the extra / but would prevent it in the future.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on January 04, 2021, 10:23:13 pm
I could not find it in my ACP settings for smileys so I think the bug is in the code.It is in this forum quick reply smileys too.  ;D
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on January 04, 2021, 10:26:24 pm
Test :D (I got
Code: [Select]
https://www.elkarte.net/community/smileys/default/cheesy.gif
from the QR ... are you using the full editor there maybe?
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 05, 2021, 01:54:35 am
I get the following when doing a reply. 

O:-)

Code: [Select]
https://www.elkarte.net/community/smileys/default/angel.gif
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on January 05, 2021, 03:51:42 am
Test :D (I got
Code: [Select]
https://www.elkarte.net/community/smileys/default/cheesy.gif
from the QR ... are you using the full editor there maybe?
Yes. The one in quick reply full editor, not its output in the post. You can check the image in quick reply with full editor that each smileys have double backslash in its url by checking its link or simply viewing the smiley image in a new tab or windows. Very minor bug I'd say.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 06, 2021, 05:26:27 pm
Another error I think releated to the same thing. When going to edit an existing post I get the following;

Quote


    admin
    Today at 04:23:51 pm
    192.168.0.15

    Mmh83QsxVcT8TrmU99MCYvSvwJHLvOh9
    Type of error: database
    Database Error: ERROR: syntax error at or near "OFFSET"
    LINE 14: LEFT JOIN elkarte_ OFFSET 0 members AS mem ON (mem.id_memb...
    ^

    http://192.168.0.70/Elkarte/index.php?action=post;msg=3;topic=3.0

    File: /var/www/html/Elkarte/sources/subs/Topic.subs.php
    Line: 1621

That's not quick edit that works correctly. It's also on postgresql.

To help here is the query before and after the preg_replace

Before
Code: [Select]
string(520) "
SELECT
m.subject, COALESCE(mem.real_name, m.poster_name) AS real_name, m.poster_time, m.body,
m.id_msg, m.smileys_enabled, m.id_member
FROM (
SELECT
m.id_msg
FROM {db_prefix}messages AS m
WHERE m.id_topic = {int:current_topic}
AND m.id_msg < {int:msg_before}
ORDER BY m.id_msg DESC
LIMIT {int:start}, {int:messages_per_page}) AS o
JOIN {db_prefix}messages as m ON o.id_msg=m.id_msg
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
ORDER BY m.id_msg DESC"

After

Code: [Select]
string(526) "
SELECT
m.subject, COALESCE(mem.real_name, m.poster_name) AS real_name, m.poster_time, m.body,
m.id_msg, m.smileys_enabled, m.id_member
FROM (
SELECT
m.id_msg
FROM {db_prefix}messages AS m
WHERE m.id_topic = {int:current_topic}
AND m.id_msg < {int:msg_before}
ORDER BY m.id_msg DESC
LIMIT {int:messages_per_page}) AS o
JOIN {db_prefix}messages as m ON o.id_msg=m.id_msg
LEFT JOIN {db_prefix} OFFSET {int:start} members AS mem ON (mem.id_member = m.id_member)
ORDER BY m.id_msg DESC"

The issue is your regex looks for the last } token, which in this case is the last db_prefix not the one on the same line. I'm not sure why the single line is being ignored.


Final edit:

Changing the s to a m seems to resolve the issue in this case.

Code: [Select]
$db_string = preg_replace('~\sLIMIT\s(\d+|{int:.+}),\s*(\d+|{int:.+})\s*(.*)$~im', 'LIMIT $2 OFFSET $1 $3', $db_string);

Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on January 06, 2021, 08:23:10 pm
Well, darn!  Thank you for the extra testing!

I think we should back up a bit and try a simple single line capture and replace allowing for same line "stuff", including none, after the limit.  The old regex with the $ is probably just to greedy. Could you try this, it only has the case modifier and is only trying to find the limit code.

Code: [Select]
		$db_string = preg_replace('~\sLIMIT\s(\d+|{int:.+}),\s*(\d+|{int:.+}).*~i', 'LIMIT $2 OFFSET $1', $db_string);
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 06, 2021, 09:05:33 pm
Well, darn!  Thank you for the extra testing!

I think we should back up a bit and try a simple single line capture and replace allowing for same line "stuff", including none, after the limit.  The old regex with the $ is probably just to greedy. Could you try this, it only has the case modifier and is only trying to find the limit code.

Code: [Select]
		$db_string = preg_replace('~\sLIMIT\s(\d+|{int:.+}),\s*(\d+|{int:.+}).*~i', 'LIMIT $2 OFFSET $1', $db_string);

I’ll try this later, what I posted here seems to work on all the pages I’ve tried so far. Even if it is a bit greedy.

The better fix is to correct the query at source, rather than rewrite it imo.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 06, 2021, 09:40:06 pm
Well, darn!  Thank you for the extra testing!

I think we should back up a bit and try a simple single line capture and replace allowing for same line "stuff", including none, after the limit.  The old regex with the $ is probably just to greedy. Could you try this, it only has the case modifier and is only trying to find the limit code.

Code: [Select]
		$db_string = preg_replace('~\sLIMIT\s(\d+|{int:.+}),\s*(\d+|{int:.+}).*~i', 'LIMIT $2 OFFSET $1', $db_string);

Code: [Select]
ERROR: syntax error at or near "JOIN"
LINE 12: JOIN elkarte_messages as m ON o.id_msg=m.id_msg
^
File: /var/www/html/Elkarte/sources/subs/Topic.subs.php
Line: 2198

Note: Your database version is 1.1.6.

Before;
Code: [Select]
string(323) "
SELECT
m.id_msg, m.id_member
FROM (
SELECT
id_msg
FROM {db_prefix}messages
WHERE id_topic = {int:current_topic}
AND (approved = {int:is_approved} OR id_member = {int:current_member})
ORDER BY id_msg
LIMIT 0, 15) AS o
JOIN {db_prefix}messages as m ON o.id_msg=m.id_msg
ORDER BY m.id_msg "
After;
Code: [Select]
string(321) "
SELECT
m.id_msg, m.id_member
FROM (
SELECT
id_msg
FROM {db_prefix}messages
WHERE id_topic = {int:current_topic}
AND (approved = {int:is_approved} OR id_member = {int:current_member})
ORDER BY id_msg
LIMIT 15 OFFSET 0
JOIN {db_prefix}messages as m ON o.id_msg=m.id_msg
ORDER BY m.id_msg "
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 06, 2021, 09:54:29 pm
The following works if you want a more limited capture group. You could use \d if you wanted rather than [0-9] I just prefer that.

The (\s*) capture groups are there to catch where you have varying whitespace between the LIMIT and or , I just ignore them in the replacement.

Code: [Select]
$db_string = preg_replace('~LIMIT (\s*)([0-9]+|{int:.+}),(\s*)([0-9]+|{int:.+})~im', 'LIMIT $4 OFFSET $2', trim($db_string));
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on January 06, 2021, 10:35:02 pm
nods ... or back to the beginning and dropping that $ and s
Code: [Select]
		$db_string = preg_replace('~\sLIMIT\s(\d+|{int:.+}),\s*(\d+|{int:.+})(.*)~i', 'LIMIT $2 OFFSET $1 $3', $db_string);
which should capture any fluff after the limit and add it back in.

Quote
The better fix is to correct the query at source, rather than rewrite it imo.
Well my preference "way back" was to only support mysql  O:-)

I imagine what is in the code is just a left over, perhaps mysql did not always support compatibility with PostgreSQL LIMIT row_count OFFSET offset syntax?  If it did (I have no idea) it could date way back to old times of the software only supporting mysql.  A redo of those could be done, it would be one of those thankless jobs that makes no real difference but its certainly doable.


Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 06, 2021, 10:59:35 pm
nods ... or back to the beginning and dropping that $ and s
Code: [Select]
		$db_string = preg_replace('~\sLIMIT\s(\d+|{int:.+}),\s*(\d+|{int:.+})(.*)~i', 'LIMIT $2 OFFSET $1 $3', $db_string);
which should capture any fluff after the limit and add it back in.

Quote
The better fix is to correct the query at source, rather than rewrite it imo.
Well my preference "way back" was to only support mysql  O:-)

I imagine what is in the code is just a left over, perhaps mysql did not always support compatibility with PostgreSQL LIMIT row_count OFFSET offset syntax?  If it did (I have no idea) it could date way back to old times of the software only supporting mysql.  A redo of those could be done, it would be one of those thankless jobs that makes no real difference but its certainly doable.




Not tested it, but that looks like it’ll work. Depends on if you want to stop at the end of the LIMIT OFFSET group or continue.

MySQL has to my knowledge always supported LIMIT OFFSET it’s also had the LIMIT 0,10 and people used that as they are lazy. Fixing it here helps in the fact it catches modifications also.

SimplePortal for instance doesn’t run on PostgreSQL. I run PostgreSQL and MSSQL on my machines, I actually have Elkarte running on MSSQL somewhere just as I was playing with MSSQL on Linux and wanted to see if it’d work. That’s full of regex mind to replace strings and is a bit brittle.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on January 06, 2021, 11:08:58 pm
I can definitely see the lazy aspect .... it saved some typing, and replaced it with a glorious debug cycle!

No reason not to change it on 2.0 but pretty well stuck with in in the 1.1x branch. 

I recall SP was MySQL only, but I don't think it was many querys that limit that.  I'd have to check the elk branch of SP to see where the restriction remains but thats a ways down on the old todo list these days.  

Again thanks for your help and debug .. this time to test I added that line to the MySQL query class so all of its limit statements are converted to row_count OFFSET offset syntax
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 07, 2021, 01:15:18 am
Again thanks for your help and debug .. this time to test I added that line to the MySQL query class so all of its limit statements are converted to row_count OFFSET offset syntax

Just to confirm no issues with PostgreSQL either and your last suggested fix.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on January 14, 2021, 12:50:28 am
Attached is the latest 1.1.7 patch package ... it incorporates feedback from this thread, a few items from php7.4, error log entries that could be address, and another small drafts bug.  Oh yes I forgot about that double // issue  :-[ if I remember to check I'll add it in the final release.

If you are running the previous patch, just uninstall first, then replace the old package with this one and reinstall.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Antechinus on January 15, 2021, 11:35:12 pm
Cool. As it turns out I have been too distracted to test the earlier patch anyway. :D
I'll have a go at this one though.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on January 16, 2021, 08:13:45 am
I haven't test the new one but I hope I can try it soon.

And once this patch already work on 7.4 and even 8.0, I think halting 1.1 is the best to focus on 2.0.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on January 16, 2021, 04:35:19 pm
That is the plan, or at least mine :)
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on January 17, 2021, 03:50:50 pm
Various errors while uninstalling the old package and reinstalling new one. I was using php7.4, custom theme.

Code: [Select]
Type of error: General
Unknown Error: Invalid characters passed for attempted conversion, these have been ignored
index.php?action=admin;area=packages
File: /var/www/clients/client2/web1/web/sources/subs/UnTgz.class.php
Line: 390


Type of error: General
Notice: Trying to access array offset on value of type null
index.php?action=admin;area=packages;sa=showoperations;operation_key=652;package=ElkArte_117_patch.zip;filename=modifications.xml
File: /var/www/clients/client2/web1/web/sources/subs/BBC/BBCParser.php
Line: 285


Type of error: General
Notice: Trying to access array offset on value of type null
index.php?action=admin;area=packages;sa=showoperations;operation_key=651;package=ElkArte_117_patch.zip;filename=modifications.xml
File: /var/www/clients/client2/web1/web/sources/subs/BBC/BBCParser.php
Line: 285


Type of error: General
Notice: Trying to access array offset on value of type null
index.php?action=admin;area=packages;sa=showoperations;operation_key=640;package=ElkArte_117_patch.zip;filename=modifications.xml
File: /var/www/clients/client2/web1/web/sources/subs/BBC/BBCParser.php
Line: 285


Type of error: General
Notice: Trying to access array offset on value of type null
index.php?action=admin;area=packages;sa=showoperations;operation_key=631;package=ElkArte_117_patch.zip;filename=modifications.xml
File: /var/www/clients/client2/web1/web/sources/subs/BBC/BBCParser.php
Line: 285


Type of error: General
Notice: Trying to access array offset on value of type null
index.php?action=admin;area=packages;sa=showoperations;operation_key=630;package=ElkArte_117_patch.zip;filename=modifications.xml
File: /var/www/clients/client2/web1/web/sources/subs/BBC/BBCParser.php
Line: 285


Type of error: General
Notice: Trying to access array offset on value of type null
index.php?action=admin;area=packages;sa=showoperations;operation_key=628;package=ElkArte_117_patch.zip;filename=modifications.xml
File: /var/www/clients/client2/web1/web/sources/subs/BBC/BBCParser.php
Line: 285


Type of error: General
Unknown Error: Invalid characters passed for attempted conversion, these have been ignored
index.php?action=admin;area=packages;sa=install;package=ElkArte_117_patch.zip
File: /var/www/clients/client2/web1/web/sources/subs/Package.subs.php
Line: 2929


Type of error: General
Unknown Error: Invalid characters passed for attempted conversion, these have been ignored
index.php?action=admin;area=packageservers;sa=upload2
File: /var/www/clients/client2/web1/web/sources/subs/UnTgz.class.php
Line: 390


Type of error: General
Unknown Error: Invalid characters passed for attempted conversion, these have been ignored
index.php?action=admin;area=packages;sa=browse
File: /var/www/clients/client2/web1/web/sources/subs/UnTgz.class.php
Line: 390


Type of error: General
Unknown Error: Invalid characters passed for attempted conversion, these have been ignored
index.php?action=admin;area=packages
File: /var/www/clients/client2/web1/web/sources/subs/UnTgz.class.php
Line: 390


Guest
Type of error: General
Unknown Error: Array and string offset access syntax with curly braces is deprecated
index.php?action=login
File: /var/www/clients/client2/web1/web/sources/subs/Compat.subs.php
Line: 36


Guest
Type of error: General
Unknown Error: Array and string offset access syntax with curly braces is deprecated
index.php?action=login
File: /var/www/clients/client2/web1/web/sources/subs/Package.subs.php
Line: 2420


Type of error: General
Unknown Error: Invalid characters passed for attempted conversion, these have been ignored
index.php?action=admin;area=packages
File: /var/www/clients/client2/web1/web/sources/subs/UnTgz.class.php
Line: 390

Code related to line 390 /sources/subs/UnTgz.class.php
Code: [Select]
	private function _read_current_header()
{
$octdec = array('mode', 'uid', 'gid', 'size', 'mtime', 'checksum', 'type');

// Each file object is preceded by a 512-byte header record on 512 boundaries
$this->_header = substr($this->data, $this->_offset << 9, 512);

// Unpack
$this->_current = unpack('a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100linkname/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155path', $this->_header);

// Clean the header fields, convert octal to decimal as needed
foreach ($this->_current as $key => $value)
{
if (in_array($key, $octdec))
$this->_current[$key] = octdec(trim($value));
else
$this->_current[$key] = trim($value);
}
}

Code related to line 285 /sources/subs/BBC/BBCParser.php
Code: [Select]
			// The only special case is 'html', which doesn't need to close things.
if ($tag[Codes::ATTR_BLOCK_LEVEL] && $tag[Codes::ATTR_TAG] !== 'html' && empty($this->inside_tag[Codes::ATTR_BLOCK_LEVEL]))
{
$this->closeNonBlockLevel();
}

Code related to line 2420 /sources/subs/Package.subs.php
Code: [Select]
function package_crypt($pass)
{
$n = strlen($pass);

$salt = session_id();
while (strlen($salt) < $n)
$salt .= session_id();

for ($i = 0; $i < $n; $i++)
$pass[$i] = chr(ord($pass[$i]) ^ (ord($salt[$i]) - 32));

return $pass;
}


Code related to line 2929 /sources/subs/Package.subs.php
Code: [Select]
function elk_chmod($file, $mode = null)
{
$result = false;

if (!isset($mode))
{
if (is_dir($file))
{
$mode = 0755;
}
else
{
$mode = 0664;
}
}

// Make sure we have a form of 0777 or '777' or '0777' so its safe for intval '8'
if ($mode == decoct(octdec("$mode")))
$result = @chmod($file, intval($mode, 8));

return $result;
}


Code related to line 36 /sources/subs/Compat.subs.php
Code: [Select]
function sha1_smf($str)
{
// If we have mhash loaded in, use it instead!
if (function_exists('mhash') && defined('MHASH_SHA1'))
return bin2hex(mhash(MHASH_SHA1, $str));

$nblk = (strlen($str) + 8 >> 6) + 1;
$blks = array_pad(array(), $nblk * 16, 0);

$str_len = strlen($str);
for ($i = 0; $i < $str_len; $i++)
$blks[$i >> 2] |= ord($str[$i]) << (24 - ($i % 4) * 8);

$blks[$i >> 2] |= 0x80 << (24 - ($i % 4) * 8);

return sha1_core($blks, $str_len * 8);
}
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on January 18, 2021, 12:19:33 am
Thanks @ahrasis I've seen some of those errors during the uninstall as well but they only showed up right after the uninstall of 1.1.7 and all seem related to php 7.4 compatibility (that 1.1.7 fixes)

I'm not sure what I can do about those, it almost seems like the error display is set to allow them to display during uninstall and then goes back to normal don't display warnings. 

Are you also only seeming these on the first uninstall screen from 1.1.7 -> 1.1.6 ?  and then no more (well other than the server error log)

Maybe @emanuele has an idea.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: vbgamer45 on January 22, 2021, 06:52:15 pm
If you are moving towards php 8.0 here are the errors I am getting right now not usable
Code: [Select]
PHP 8.0 errors

Deprecated: Required parameter $table follows optional parameter $method in /home/host/public_html/testelk/sources/database/Db.php on line 179

Deprecated: Required parameter $columns follows optional parameter $method in /home/host/public_html/testelk/sources/database/Db.php on line 179

Deprecated: Required parameter $data follows optional parameter $method in /home/host/public_html/testelk/sources/database/Db.php on line 179

Deprecated: Required parameter $keys follows optional parameter $method in /home/host/public_html/testelk/sources/database/Db.php on line 179

Deprecated: Required parameter $table follows optional parameter $method in /home/host/public_html/testelk/sources/database/Db-mysql.class.php on line 711

Deprecated: Required parameter $columns follows optional parameter $method in /home/host/public_html/testelk/sources/database/Db-mysql.class.php on line 711

Deprecated: Required parameter $data follows optional parameter $method in /home/host/public_html/testelk/sources/database/Db-mysql.class.php on line 711

Deprecated: Required parameter $keys follows optional parameter $method in /home/host/public_html/testelk/sources/database/Db-mysql.class.php on line 711
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on January 24, 2021, 11:32:05 pm
Indeed php8 is a strict little bugger!

I *think* I fixed those errors in the 2.0 branch (but that has a much newer db scheme).  In 1.1.7, hey "depreciated" warnings are not the worst thing, does the site work on 8 otherwise?
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: vbgamer45 on January 25, 2021, 12:44:43 am
No the site does not work due to those errors. If you need a php8 testing area let me know.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on January 25, 2021, 02:31:37 am
Thanks for the offer, I do have a docker php8 container that I can try to reproduce with first.  I'm surprised that a depreciation notice would drop the site, must be another error that is aborting things that is not getting logged. 
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: vbgamer45 on January 25, 2021, 03:42:01 am
Yeah basically what happens is you get an error message that says
"session_set_save_handler(): Session save handler cannot be changed after headers have already been sent"

Which stops you from logging in or doing any action.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on January 25, 2021, 05:48:42 pm
I just tried to install the patch but
"Error in package installation..." :
./sources/subs/Editor.subs.php   Test failed
/sources/subs/MessageTopicIcons.class.php   Test failed
I didn't finish the install : i waiting for your answer before finish it.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on January 25, 2021, 06:08:28 pm
The latest patch was installed fine on mine. No idea why yours has such errorsin that subs files.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on January 30, 2021, 12:41:17 pm
Hi,
even with the errors i made the uptate to the 1.1.7 patch and everything seems to be ok. No more errors in the logs at this time.
philippe
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on January 31, 2021, 09:58:12 am
I comme back to 1.1.6 : with 1.1.7 i can't Edit... HTTP ERROR 500.
Maybe it's because of the errors at the install :
./sources/subs/Editor.subs.php   Test failed
/sources/subs/MessageTopicIcons.class.php   Test failed
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: radu81 on January 31, 2021, 10:28:37 am
Tested on a clean install, for now nothing to report.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 31, 2021, 11:59:59 am
I comme back to 1.1.6 : with 1.1.7 i can't Edit... HTTP ERROR 500.
Maybe it's because of the errors at the install :
./sources/subs/Editor.subs.php   Test failed
/sources/subs/MessageTopicIcons.class.php   Test failed

What are the errors? Is that a clean forum or one which has mods applied?
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on January 31, 2021, 12:07:51 pm
Hi,
The errors :
"Error in package installation..." :
./sources/subs/Editor.subs.php   Test failed
/sources/subs/MessageTopicIcons.class.php   Test failed
Packages :
ElkArte 1.1.4 patch
ElkArte 1.1.5 patch
ElkArte 1.1.6 patch
FlarumStyle
MPAAP: Modify Posts At Anytime Permission
Thank you,
Philippe
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 31, 2021, 12:28:15 pm
Hi,
The errors :
"Error in package installation..." :
./sources/subs/Editor.subs.php   Test failed
/sources/subs/MessageTopicIcons.class.php   Test failed
Packages :
ElkArte 1.1.4 patch
ElkArte 1.1.5 patch
ElkArte 1.1.6 patch
FlarumStyle
MPAAP: Modify Posts At Anytime Permission
Thank you,
Philippe

Sorry I should of been clearer when you have the test failed, if you open the test up you will see the test that failed.

If you remove flarumstyle  and mpaap does it pass? I would guess one of those two mods edited the code there.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on January 31, 2021, 01:44:16 pm
MPAAP: Modify Posts At Anytime Permission
Remove this addon first as it may have modified certain files.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on January 31, 2021, 04:32:36 pm
I uninstall both MPAAP and flarum but nothing change.
if you open the test up you will see the test that failed.
I'm not sure to understand ! Sorry for my English.
When i Edit the error, there is a button for that on left, for the first error the changes are on
Code: [Select]
Code: (Replace) [Select]

 * copyright: 2011 Simple Machines (http://www.simplemachines.org)
 * license:  BSD, See included LICENSE.TXT for terms and conditions.
 *
 * @version 1.1.7
 *
 */

/**
 * Creates a box that can be used for richedit stuff like BBC, Smileys etc.
 *

For the second error the code is :
Code: [Select]
Code: (Remplacer) [Sélectionner]

$this->_loadStableIcons();

// Merge in additional ones
$this->_loadCustomIcons();
$this->_merge_all_icons();
$this->_loadIcons();
}

/**
* Use a passed custom array or fetch the ones available for the board in use
*/
private function _loadCustomIcons()
{
global $board;

// Are custom even an option?
if ($this->_allowCustomIcons() && empty($this->_custom_icons))
{
// Fetch any additional ones
require_once(SUBSDIR . '/MessageIcons.subs.php');
$this->_custom_icons = getMessageIcons(empty($board) ? 0 : $board);
}
}

/**
* This function merges in any custom icons with our standard ones.
*
* @return array
*/
private function _merge_all_icons()
{
// Are custom even an option?
if ($this->_allowCustomIcons())
{
// Merge in additional ones
$custom_icons = array_map(function ($element) {
return $element['name'];
}, $this->_custom_icons);

$this->_stable_icons = array_merge($this->_stable_icons, $custom_icons);
}
}

/**
* Simply checks the ACP status of custom icons
*
* @return bool
*/
private function _allowCustomIcons()
{
global $modSettings;

return !empty($modSettings['messageIcons_enable']);
}

/**
* Return the icon specified by idx
*
* @param int|string $idx
* @return string

Is it what you mean tino ?
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on January 31, 2021, 07:44:00 pm
Your English is fine. I’ll have a look later and get back to you on the error.

Could you attach a copy of your Editor.subs.php and also the MessageTopicIcons.class.php please?
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on January 31, 2021, 10:07:47 pm
Thank you.
philippe
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on February 01, 2021, 12:38:46 pm
Thank you.
philippe

In Editor.subs.php you have a commented out line in the icons array, this is causing the update to fail. If you fix that it should work.
Code: [Select]
//array('value' => 'vidéo', 'name' => $txt['icon_camera']),

In the MessageTopicIcons.class.php on line 74 you have the following
Code: [Select]
$this->_stable_icons = array_merge($this->_stable_icons, array_column($custom, 'first_icon'));  

It should be
Code: [Select]

        $custom_icons = array_map(function($element) {                                                                                                                                                         
                 return $element['first_icon'];                                                                                                                                                                     
         }, $custom);                                                                                                                                                                                           
        $this->_stable_icons = array_merge($this->_stable_icons, $custom_icons);

If you correct those two differences the patch should pass.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on February 01, 2021, 01:39:25 pm
Hi tino,
I deleted the line in Editor.subs.php and no more error for this file.
But for the second i made like you said but still the same error : i read and read again but don't see what is different !
The code in the file :
Code: [Select]
		$this->_loadStableIcons();

// Merge in additional ones
$custom_icons = array_map(function($element) {                                                                                                                                                        
                 return $element['first_icon'];                                                                                                                                                                    
         }, $custom);                                                                                                                                                                                          
        $this->_stable_icons = array_merge($this->_stable_icons, $custom_icons);

$this->_loadIcons();
}

/**
* Return the icon specified by idx, or the default icon for invalid names
*
* @param int|string $idx
* @return string
Thank you again for your help.
Philippe
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on February 01, 2021, 03:45:24 pm
It's the formatting which is slightly out. Try the attached file Ok I can't seem to upload anything to here and get error's.

You need to check the spacing as it is slightly out in your copied code. Try the below

Code: [Select]
    // Merge in additional ones
    $custom_icons = array_map(function($element) {
      return $element['first_icon'];
    }, $custom);
    $this->_stable_icons = array_merge($this->_stable_icons, $custom_icons);
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on February 01, 2021, 04:30:57 pm
A great THANK'S : it works.
I can't also upload anything !
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Antechinus on February 06, 2021, 11:02:50 pm
Attached is the latest 1.1.7 patch package ... it incorporates feedback from this thread, a few items from php7.4, error log entries that could be address, and another small drafts bug.  Oh yes I forgot about that double // issue  :-[ if I remember to check I'll add it in the final release.

If you are running the previous patch, just uninstall first, then replace the old package with this one and reinstall.
Just got around to trying this on local (running 7.1.24). Installs and uninstalls without errors. I need a new local that runs up to date PHP.  :P

Will set up an online test site too (Liroy's server is currently on 7.2 by default, but I can bump it to 7.3 or 7.4 for testing).
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on February 07, 2021, 03:20:42 am
Awesome, thank you for testing.  With 1.1.7 you should be fine up to 7.4 :D
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on February 16, 2021, 07:43:51 pm
Just applied a small refresh to the 1.1.7 update on this site.  The last patch file I posted was missing a file used in desktop notifications and there were a couple of additional small issues found and resolved.   I've bundled up the new patch but want to test it before I post it.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on February 17, 2021, 02:09:16 am
Can you fix the error when calling insert?

It throws a depreciated error on the first param having a default and the others not. I don’t see why it’s set on that one myself.

I’ll do a PR if you’d like, I’ve not seen any errors changing it and a grep didn’t show any cases where it would cause an issue, unless I’m blind!
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on February 17, 2021, 02:22:17 am
I have not seen that one ... but yes make a PR to the 1.1.7 patch branch and I'll get it in the patch!
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on February 17, 2021, 02:34:32 am
I have not seen that one ... but yes make a PR to the 1.1.7 patch branch and I'll get it in the patch!

I’ll do it tomorrow, it doesn’t show in the Elkarte error log, does on the Apache one.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on February 28, 2021, 04:25:44 pm
I don't know if it is because of the patch 1.1.7 but i now only have it.
When a new member registers he must activate his account with a link in an email.
He receives the email but the link to activate return an error :
X
On Back the page stays the same, always.
But if the member tries to login it works.
There is no error in the logs.

It seems that's the message is not the good one.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: radu81 on February 28, 2021, 11:00:40 pm
Maybe he clicked twice on the link to confirm registration.

I just checked on my test forum and I cannot reproduce this error, it works.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on March 01, 2021, 10:13:50 am
Hi,
I tried myself and i have the same thing with only one click.
You can try at https://augras.eu/forum_zwii (https://augras.eu/forum_zwii)(it's an elkarte to test for a new forum : but by default it is in french).
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Steeley on March 01, 2021, 10:47:57 am
Hi,
I tried myself and i have the same thing with only one click.
You can try at https://augras.eu/forum_zwi (https://augras.eu/forum_zwi)i (it's an elkarte to test for a new forum : but by default it is in french).

Which version of EA did you upgrade from augras? (Or rather, what was the last version that you know worked properly?)
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: radu81 on March 01, 2021, 12:52:24 pm
@augras‍ the link you provide return a 404 error
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on March 01, 2021, 01:40:02 pm
A link that works : https://augras.eu/forum_zwii (https://augras.eu/forum_zwii). Sorry @radu81.
@Steeley, i have 2 ElKarte : the first one is 1.1.4+1.1.5+1.1.6+1.1.7, the second to test 1.1.6+1.1.7.
Same thing on the twice.
It worked fine on the first one in 1.1.6 and less. For the second it was only for the test of the patch 1.1.7 and i never use it before.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: radu81 on March 01, 2021, 01:48:11 pm
A link that works : https://augras.eu/forum_zwii. Sorry
on this works fine, I just did a test. If you want you may cancel my account (username radu)
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on March 01, 2021, 01:57:53 pm
It's very strange !
I made a new test just before you, on my 2 elkarte, and got the error.
I have to go to work now, but il will make new tests later.
Thank you @radu81 for your test.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Steeley on March 02, 2021, 08:02:23 am
It's very strange !
I made a new test just before you, on my 2 elkarte, and got the error.
I have to go to work now, but il will make new tests later.
Thank you @radu81 for your test.


"LeBeuf" n'a eu aucun problème avec l'e-mail de vérification

(Je n'ai pas cliqué sur le lien, j'ai copié et collé le lien dans mon navigateur Firefox )

English Translation: "Worked for me!"
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on March 02, 2021, 01:34:05 pm
Thank you @Steeley and @radu81 for your tests.
I just made tests with 2 new members and it is ok. It's from my work and i get my emails from a webmail.
At home i'm with a chromebook and i read my emails with bluemail : maybe the problem is bluemail. I will make new tests tonight at home : with bluemail and with the webmail to see if there is something different.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: radu81 on March 02, 2021, 06:00:17 pm
The only strange thing I noticed into your forum is that the links inside the confirmation mail were not active. I used a hotmail account to register on your forum and also on my test forum. On my test forum were fine.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on March 02, 2021, 06:31:27 pm
@radu81 the links are active for me : in the webmail (rainloop) and in the android app Bluemail. I really don't understand why the links are not active with hotmail.

I note that the link is stange : [Lien](https://augras.eu/forum_zwii/index.php?action=register;sa=activate;u=13;code=5hIFrMOZEwD2KA (https://augras.eu/forum_zwii/index.php?action=register;sa=activate;u=13;code=5hIFrMOZEwD2KA))
There is [Lien] at the beginning and the link is between () : it's not like this in others emails.
I take a look to the translation to see if i made some mistakes that can explain it, if something was wrong, but found anything.
Is it like this on your test forum ? 

As i said i made new tests at home and everything works fine with the webmail but not with Bluemail. This android app seems to have some problems.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Steeley on March 02, 2021, 10:06:51 pm
The only strange thing I noticed into your forum is that the links inside the confirmation mail were not active. I used a hotmail account to register on your forum and also on my test forum. On my test forum were fine.

I believe the "links" identification is inserted by your client, radu81

My email client is Pegasus.. and its link-marking gets corrupted by the ":" in the link address, which is why I copied and pasted the full (2nd) link into my browser (rather than via the 3rd link and manually inserting the code). 
However, this would be unrelated to the problem augras is having - a bad link would not give the error result he is seeing..
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Steeley on March 02, 2021, 10:15:44 pm
As i said i made new tests at home and everything works fine with the webmail but not with Bluemail. This android app seems to have some problems.

Maybe a silly question, but is it possible you are "double-clicking" the link, where the android would activate the link on just one tap, and the second tap sends a second activation, resulting in a "Already authenticated" error?
 
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on March 04, 2021, 01:41:05 pm
Hi,
A chromebook has a normal keybord and mouse. I used my mouse and it's not possible : i made one click each time.
The OS is chrome os : android app works... but not all and sometimes not like on a smartphone. Bluemail must be one that doesn't work correctly.
 
I note that the link is stange : [Lien](https://augras.eu/forum_zwii/index.php?action=register;sa=activate;u=13;code=5hIFrMOZEwD2KA (https://augras.eu/forum_zwii/index.php?action=register;sa=activate;u=13;code=5hIFrMOZEwD2KA))
There is [Lien] at the beginning and the link is between () : it's not like this in others emails.
How is the link to activate in your message on your own forum ? Like mine ?
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 04, 2021, 07:51:57 pm
This is complicated, which means my explanation is going to be so-so

First [Link](some url) is the way the links have been for some time, those are in markdown syntax when you are viewing the plain text version of an email.

In pre 1.1.7 only plain text was sent out in emails, and that trailing ')' would cause some email clients to see an invalid link or not find the link or ...  In 1.1.7 I added a special utf-8 character at the end of the link, so now they *should* look like
[Link](http://www.elkarte.net/ 🔗)

The purpose of that link icon was/is to force the email to contain at least (2) versions, a plain text version and a Base64 encoded version.  The thing to know is that emails can contain multiple versions of the same message, plain text is always required, then you can have base64 encoded and HTML versions and others as well.   The are supposed to be in order of increasing accuracy plain->base->html

There is some hotmail and specific "site" code like bellsouth and att ... lets call it a bunch of cruft code we have, and to be honest I have no idea if its even relevant any longer, I suspect not but all that is in as well.  That code will in some instances also send the html version but does some character manipulation.  I've resisted sending HTML versions simply because those increase the likelihood that it will be tagged as spam.  Not many plain text exploits, but plenty of HTML ones.

If you have the raw .eml file for that email that failed, that would be a BIG help in understanding if the email was wrong or that another email client is interpreting things wrong, or some other problem.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Steeley on March 04, 2021, 08:17:00 pm

How is the link to activate in your message on your own forum ? Like mine ?

I posted a screen shot of your registration email in a post above, @augras , and mine is below..

Other than mine being in english, what I see is pretty much like yours.  However, reading @Spuds input, I do see in the raw view of the emails that at the end of your registration email is the following:

Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64

TWVyY2kgZGUgdm91cyDDqnRyZSBpbnNjcml0IHN1ciBTdXBwb3J0IFp3aWlDTVMuIFZvdHJlIGlk
ZW50aWZpYW50IGVzdCBMZUJldWYuIFNpIHZvdXMgb3VibGlleiB2b3RyZQptb3QgZGUgcGFzc2Us
IHZvdXMgcG91dmV6IGxlIHLDqWluaXRpYWxpc2VyIGVuIGFsbGFudCBsw6AKW0xpZW5dKGh0dHBz
Oi8vYXVncmFzLmV1L2ZvcnVtX3p3aWkvaW5kZXgucGhwP2FjdGlvbj1yZW1pbmRlcikgIAoKQXZh
bnQgZGUgcG91dm9pciB2b3VzIGNvbm5lY3RlciB2b3VzIGRldmV6IGQnYWJvcmQgYWN0aXZlciB2
b3RyZSBjb21wdGUgZW4gY2xpcXVhbnQgc3VyIGxlIGxpZW4Kc3VpdmFudCA6ICAKCltMaWVuXSho
dHRwczovL2F1Z3Jhcy5ldS9mb3J1bV96d2lpL2luZGV4LnBocD9hY3Rpb249cmVnaXN0ZXI7c2E9
YWN0aXZhdGU7dT0xMTtjb2RlPTYwdXBhS2w2NnU0U3lCKSAKCgpTaSB2b3VzIGRldmlleiBhdm9p
ciBkZXMgcHJvYmzDqG1lcyBhdmVjIHZvdHJlIGFjdGl2YXRpb24gdmV1aWxsZXogYWxsZXogc3Vy
IGxlIGxpZW4KW0xpZW5dKGh0dHBzOi8vYXVncmFzLmV1L2ZvcnVtX3p3aWkvaW5kZXgucGhwP2Fj
dGlvbj1yZWdpc3RlcjtzYT1hY3RpdmF0ZTt1PTExKSBldCBzYWlzaXIgbGUgY29kZQoiNjB1cGFL
bDY2dTRTeUIiLiAgCgpDb3JkaWFsZW1lbnQsICAKTCfDqXF1aXBlIGRlIFN1cHBvcnQgWndpaUNN
Uw==

--ELK-2ce093dfec01ff3f78d2f48d3b7fa484--


And at the end of mine is:

Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

Thank you for registering at Forum. Your username is test If you forget your password,
you can reset it by visiting
[Link](https://mydomain.com/forum/index.php?action=reminder (https://mydomain.com/forum/index.php?action=reminder)) 

Before you can login, you first need to activate your account. To do so, please follow this link: 

[Link](https://mydomain.com/forum/index.php?action=register;sa=activate;u=18;code=fklVhv5MpJ4ouq (https://mydomain.com/forum/index.php?action=register;sa=activate;u=18;code=fklVhv5MpJ4ouq))

Should you have any problems with activation, please visit
[Link](https://mydomain.com/forum/index.php?action=register;sa=activate;u=18 (https://mydomain.com/forum/index.php?action=register;sa=activate;u=18)) use the code
"fklVhv5MpJ4ouq". 

Regards, 
The Forum Team.
--ELK-577965c84291f1bde7fadb417439edf9--

------------------------------------------------------------------
My email client ignores the base64 encoding apparently, and if that is the culprit somehow, it explains why I don't see the "already-authenticated" error.

Hope this helps in some way...

Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 04, 2021, 08:23:32 pm
That base64 decodes to:
Quote
Merci de vous être inscrit sur Support ZwiiCMS. Votre identifiant est LeBeuf. Si vous oubliez votre
mot de passe, vous pouvez le réinitialiser en allant là
[Lien](https://augras.eu/forum_zwii/index.php?action=reminder) 

Avant de pouvoir vous connecter vous devez d'abord activer votre compte en cliquant sur le lien
suivant : 

[Lien](https://augras.eu/forum_zwii/index.php?action=register;sa=activate;u=11;code=60upaKl66u4SyB)


Si vous deviez avoir des problèmes avec votre activation veuillez allez sur le lien
[Lien](https://augras.eu/forum_zwii/index.php?action=register;sa=activate;u=11) et saisir le code
"60upaKl66u4SyB". 

Cordialement, 
L'équipe de Support ZwiiCMS
Its encoded since there are non ascii characters, so this encoded version is more a more accurate representation of the content.  Still the link has the trailing ) ... Hummmm
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Steeley on March 04, 2021, 08:37:44 pm
Still the link has the trailing ) ... Hummmm

If you look at my screenshot my client correctly recognizes the link (the "active" part of the link doesn't include the parenthesis )
Even where it does get goofed up (see my screenshot of augras authentication in the post earlier) is still ignores the parenthesis.

I'm not sure how practical it is trying to configure forum code to be compatible with everybody's client and browser quirks.   :P
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on March 05, 2021, 08:37:12 am
I try to make an eml export and come back.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on March 05, 2021, 01:40:36 pm
No export is possible from the webmail and from bluemail !
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 05, 2021, 05:53:27 pm
OK thanks for looking.  I'll do some more tests to see if I can come up with anything
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: emanuele on March 05, 2021, 06:28:18 pm
Abandon text email and go html-only?
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 05, 2021, 09:25:21 pm
Technically you must have a plain text section.  In 2.0 I think we should have plain then base64 and then html .. different clients will need different formats, like if you have don't display html then the base64 is better than plain.   I've been tinkering with a redo of the mail area in 2.0.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 06, 2021, 05:00:13 am
Was playing with 1.1.7 fulltext and noticed if you search for an un found word, the first time you get a
Code: [Select]
Can't find FULLTEXT index matching the column list
File: /var/www/clients/client2/web2/web/sources/database/DbSearch-mysql.php
Line: 50

Note: Your database version is 1.1.6.
on the UI and in the admin log you get
Code: [Select]
INSERT IGNORE INTO elkarte_tmp_log_search_messages
(id_msg)
SELECT m.id_msg
FROM elkarte_messages AS m
WHERE m.id_board != 9
AND MATCH (body, subject) AGAINST ('+dddd' IN BOOLEAN MODE)
LIMIT 6000
Yes I searched for dddd as an example ... not sure where that error is coming from and only seems to happen when the term is not found.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on March 06, 2021, 11:08:53 am
What indexes do you have set?

I’ll try and replicate that here. I noticed there are quite a few errors with the fulltext but you can’t use all the +\-“ commands for example. I was going to rework it for 2.0.0 when I got the chance
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on March 06, 2021, 12:15:38 pm
Thinking about it, you’ve probably done the use case I didn’t cater for (or think about) which is have a fulltext index already and then update. If you recreate the fulltext index within the Elkarte setting, do you still get the error?
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 06, 2021, 01:50:05 pm
Thinking about it, you’ve probably done the use case I didn’t cater for (or think about) which is have a fulltext index already and then update. If you recreate the fulltext index within the Elkarte setting, do you still get the error?
That was it !

I had done an upgrade to my test forum that had an existing fulltext.  A remove and redo seems to fix the issue.  Will need to drop the index as part of the upgrade and have the admin rebuild one.   The same will have to be done with 2.0 custom indexes since I changed the hash algo for the custom index so after and upgrade the index is useless.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on March 06, 2021, 02:13:37 pm
Thinking about it, you’ve probably done the use case I didn’t cater for (or think about) which is have a fulltext index already and then update. If you recreate the fulltext index within the Elkarte setting, do you still get the error?
That was it !

I had done an upgrade to my test forum that had an existing fulltext.  A remove and redo seems to fix the issue.  Will need to drop the index as part of the upgrade and have the admin rebuild one.   The same will have to be done with 2.0 custom indexes since I changed the hash algo for the custom index so after and upgrade the index is useless.

You ok with me leaving that with you? As I honestly wouldn't know where to start, other than calling the drop index function from the upgrade somehow.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 07, 2021, 03:40:53 am
No problem!  

And what I intend to do, simply drop the index.  Trying to rebuild it during the upgrade would be a problem, not as bad for fulltext but with 2.0 the custom also has to be rebuilt and that could take some time (although much faster in 2.0 its still a  slow critter.  So drop the index and set a note somewhere that it was dropped, not sure where yet, but "somewhere" :D

Be a few days been hectic with other things this week
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: badmonkey on March 07, 2021, 04:50:43 am
Push notifications aren't working. push.min.js is missing from the zipped package, not sure what else may be offset. ;D
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: emanuele on March 07, 2021, 10:25:27 am
Technically you must have a plain text section.
Sorry, I forgot we were talking about one of the most messed up features of the internet! xD
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 07, 2021, 02:52:53 pm
Push notifications aren't working. push.min.js is missing from the zipped package, not sure what else may be offset. ;D
Yeah I missed that in the last package, I have a new "it ain't over till I say its over" package I can post that adds that and a host of additional updates.
Sorry, I forgot we were talking about one of the most messed up features of the internet! xD
Yup, email is one of the most unreliable transport mechanisms ever.  Heck 1/2 of my dns entries are all stupid email things, spf, dmarc, dkim, mx all to have it rejected anyway since all it takes is one piss poor site on a subnet.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ElkArte-Is-Awesome on March 07, 2021, 09:17:53 pm
Is it too late to request the option not to have the site send out an e-mail?  lol

I use a few other forum developments and, when possible, disable email verification. I know that is not for everyone. But there are two things I no longer worry about. 1) e-mails 2) IP addresses.  It does not matter if someone is a friend or foe; anyone can popup using a different IP or e-mail without any effort.

Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 07, 2021, 11:52:52 pm
If you mean on registration, you can set that to Admin approves or Immediate ... I don't think those send any and centrally don't require email stuff.   Yes IP's and email are super easy to get and use at will.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Steeley on March 08, 2021, 02:24:33 am
If you mean on registration, you can set that to Admin approves or Immediate ... I don't think those send any and centrally don't require email stuff.   Yes IP's and email are super easy to get and use at will.

and...turn off the welcome email too..

It's interesting the different communities ... most of my users want the email, enough so that I suggested an admin option feature to set user emails as the default option for all  boards (usergroup settings control what they actually get) during registration, that the user can disable if it's not desired, rather than the user having to go into the profile and enable the notifications board by board.

If they don't get email notifications, they think nothing's going on, and don't bother to log  back in and see if anything is happening..
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 19, 2021, 07:40:05 pm
And just when you though it could not possibly get any better .... Here is the latest 1.1.7 Patch. 

This dazzling beauty adds the missing files (for the changes in desktop notifications) that were missed in the last test patch.  This update also has several additional enhancements/fixes,   I've updated the site with this latest version so its live here.  

By now you should know the routine, test and report!   If you were using the last patch, uninstall it first, then replace/install with the attached version.

Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ElkArte-Is-Awesome on March 21, 2021, 05:53:02 am
I notice the site here is also now running 1.1.7.  Let's hope this is the release.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on March 21, 2021, 08:37:37 am
Uninstalling previous patch seems to cause error 500 on my forum, so cannot test the latest patch yet. I will install it later when I am back to my PC to fix the error
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: badmonkey on March 21, 2021, 06:37:58 pm
After installing this patch, I've discovered we have a cat infestation. So far one has been discovered. Not sure how it's related to the patch. ;D


Seriously, thanks to everyone who invested their efforts into the patch! No problems to report so far!
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 21, 2021, 08:01:59 pm
Uninstalling previous patch seems to cause error 500 on my forum, so cannot test the latest patch yet. I will install it later when I am back to my PC to fix the error
That could be due to the level of PHP you are running ... 1.1.6 will cause errors on 7.4 and I think may fail on php8.  Or it could be somethinge else !
After installing this patch, I've discovered we have a cat infestation. So far one has been discovered. Not sure how it's related to the patch. ;D

Seriously, thanks to everyone who invested their efforts into the patch! No problems to report so far!
Meow Baby ... thanks for testing :D
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Steeley on March 21, 2021, 08:20:13 pm
After installing this patch, I've discovered we have a cat infestation. So far one has been discovered. Not sure how it's related to the patch. ;D

Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on March 22, 2021, 12:58:37 am
That could be due to the level of PHP you are running ... 1.1.6 will cause errors on 7.4 and I think may fail on php8.  Or it could be somethinge else !
I think that was it. Anyway, fix it easily and install the latest 1.1.7 patch with no problem so far.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ElkArte-Is-Awesome on March 23, 2021, 04:36:37 am
85% complete. Only 11 open issues left.
https://github.com/elkarte/Elkarte/milestone/30

Looking forward to 1.1.7
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on March 24, 2021, 06:53:46 pm
Hi,
Thanks for this new update.
I installed it on 2 elkarte and get each time the same error that is ignored :
X
I made a quick take a look and no other errors and everything seems to work : i will make better "tests" in the next days.Philippe
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on March 24, 2021, 11:48:58 pm
I've never seen an error message like that, interesting.  Well that specific line is not new in this version of the patch, and from the little reading I've done its another 7.4 depreciation "gift"

Are you running on *nix or *doz ? Just curious.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on March 25, 2021, 02:03:32 pm
Sorry for that "gift" !
It's apache.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ElkArte-Is-Awesome on April 01, 2021, 04:48:24 am
Are all of these code changes being applied to Github?  I have been watching, and the last change was 13 days ago. Before that, nearly a month ago. https://github.com/elkarte/Elkarte/tree/patch_1-1-7
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on April 07, 2021, 10:22:11 pm
And in the patch that would not end thread, I bring you the latest. 

This patch address a few additional problems found with the mail list function, namely the broken links (somewhat), mails with reply codes where there should be none, < br > tags leaking in to the outbound mail, and Inline attachment links being double wrapped. 

Just to note,  one of the  bugs could have prevented the correct updating of the postby_emails table when moving from 1.0 to 1.1 IF you were actively using PBE in 1.0 and upgrade to 1.1 it MAY silently fail the update and PBE will not work.   I'll probably fix the updater in this release but still pondering if I want to check on things when doing 1.1.6 to 1.1.7, but seems like someone would have reported an issue by now.

Fixed an issue where addons could not tie into the unsubscribe functions.

It also has a test code for the 7.4 depreciation notice that was reported a few posts back.

Standard routine, its for testing.  If you are running the last patch, uninstall it, use this new patch file and install this one via package manager.

Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on April 08, 2021, 01:45:17 pm
When installing I get the following using pgsql

Code: [Select]
ERROR: syntax error at or near "FROM"
LINE 3: FROM elkarte_messages
^
File: /var/www/html/Elkarte/sources/subs/ManageSearch.subs.php
Line: 36

Note: Your database version is 1.1.6.

It's trying to detect if the fulltext index is there which isn't valid for pgsql.

The following should fix that

Code: [Select]
<?php

if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('ELK'))
{
    require_once(dirname(__FILE__) . '/SSI.php');
}
elseif (!defined('ELK'))
{
    die('<b>Error:</b> Cannot install - please verify you put this in the same place as ELK\'s index.php.');
}

// Remove-file during install does not work?
if (file_exists(EXTDIR . '/cssmin.php'))
{
    unlink(EXTDIR . '/cssmin.php');
}

// Fulltext index was improved to include subjects, but needs a rebuild, so remove any existing one
global $modSettings, $db_type;

if($db_type != 'mysql')
{
    return;
}

require_once(SUBSDIR . '/ManageSearch.subs.php');

$fulltext_index = detectFulltextIndex();
alterFullTextIndex('{db_prefix}messages', $fulltext_index);

// Now if they were actually using that index, set them back to a standard search
if (!empty($modSettings['search_index']) && $modSettings['search_index'] === 'fulltext')
{
    // Set the default method.
    updateSettings(array(
        'search_index' => '',
    ));
}
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on April 08, 2021, 04:17:42 pm
Darn glad someone is keeping me postgresql honest :D  Thanks for the catch and fix
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on April 10, 2021, 03:58:37 pm
Hi,
Thanks for this new update.
I installed it on 2 elkarte and get each time the same error that is ignored :
[   admin
Aujourd'hui à 15:26:50
6b729d134a5ac7b47kwVHWpiBMOopqjR
Type d'erreur: Générale
Unknown Error: Invalid characters passed for attempted conversion, these have been ignored
https://augras.eu/forum_zwii/index.php?action=admin;area=packages;sa=install;package=Patch_117.zip
Fichier: /home/augras/public_html/augras.eu/forum_zwii/sources/subs/Package.subs.php
Ligne: 2929
I made a quick take a look and no other errors and everything seems to work : i will make better "tests" in the next days.Philippe
I updated the patch today and this gift is still here.
On the line 2929 there is : // Make sure we have a form of 0777 or '777' or '0777' so its safe for intval '8'
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on April 10, 2021, 04:13:17 pm
Then it falls in the "not going to fix" bucket.  Thanks for reporting back on this :D
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: augras on April 10, 2021, 04:15:35 pm
It's just to remmember :)
No more errors on my 2 Elkarte at this time.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: forumovod on April 12, 2021, 11:12:06 pm
Will there be an official announcement about the update to version 1.1.7 ?
Or will there be only this topic with a patch?
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on April 12, 2021, 11:36:18 pm
There will be an official announcement and release.    Since the patch is large I wanted to get a little wider testing, so thats why I've been posting updates here.  Should be released soon since it seems to be running fine.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on April 15, 2021, 11:33:39 pm
OK ... First post updated with the most recent version and all other versions have been redacted from the thread (I hope)
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on April 16, 2021, 03:25:00 am
Errors in installing the latest Patch_117_4-15-2021.

Code: [Select]
Type of error: General
Warning: A non-numeric value encountered
1. ?action=admin;area=packages;iemuh32Mu=kbRI5o3XtpmmCPoAJVW0CczHtwMbJkW0
2. ?action=admin;area=packages;sa=browse;ni8UbMSq=b5QuBHWqmuEkAPAYxcXO2NPQva3FiXT7
/sources/subs/UnTgz.class.php
Line: 392


Type of error: General
Warning: require_once(/sources/ext/cssmin.php): failed to open stream: No such file or directory
1. ?action=admin;area=packages;sa=install2;package=Patch_117_4-15-2021.zip;pid=0
/sources/SiteCombiner.class.php
Line: 241


Type of error: General
Unknown Error: Invalid characters passed for attempted conversion, these have been ignored
1. ?action=admin;area=packages;sa=install;package=Patch_117_4-15-2021.zip
/sources/subs/Package.subs.php
Line: 2929

Type of error: General
Unknown Error: Invalid characters passed for attempted conversion, these have been ignored
1. ?action=admin;area=packageservers;sa=upload2
2. ?action=admin;area=packages;sa=browse
3. ?action=admin;area=packages
/sources/subs/UnTgz.class.php
Line: 390
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on April 21, 2021, 05:42:49 pm
I was able to catch the reported depreciation notice, at least one of them. 

It occurs when the updated cssmin library (php7 fixes) was being installed.  The exact error is that s a decimal value of "493" was sent to octdec ... This is not a valid octal value due to the "9", in the number  (493 decimal = 755 octal)

So the fix in the patch would prevent that *if* it was in place during the install .. but the code it is not changed until after the package is installed.   I feel the error is actually thrown during the package test phase, which makes sense, it would be running the current code during that phase and not the updated code in the patch.

I put a potential work around so the error does not appear during install, and the patch still has the fix to prevent the error in the future.

The new patch is in the first post.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ElkArte-Is-Awesome on April 21, 2021, 08:22:02 pm
Assume no one runs into any show-stopping bugs or errors. Can we presume this will be 1.1.7 final? :-)
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on April 21, 2021, 09:18:10 pm
That is my desire as well
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: forumovod on April 21, 2021, 09:36:03 pm
Can the installation of the 1.1.7 Patch affect the performance of addons?
For example: Attachment Image Resize, Optimus, Quick Quote, SimpleAds.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: Spuds on April 21, 2021, 09:53:35 pm
Are you just curious or did you see some change?

Its going to cause a cache refresh for both user and code data as well as any minified CSS/JS so while that is happening things could be slower for a short time.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: forumovod on April 22, 2021, 10:27:49 pm
Are you just curious or did you see some change?

It's not curiosity. This is a question that is important for my forum on version 1.1.6.

Almost all addons for ElkArte 1.0-1.1 (+) have Last Update: 2020-2017.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on April 23, 2021, 08:56:04 am
Are you just curious or did you see some change?

It's not curiosity. This is a question that is important for my forum on version 1.1.6.

Almost all addons for ElkArte 1.0-1.1 (+) have Last Update: 2020-2017.

That will be up to the mod authors to test and change if there are any issues.

Title: Re: ElkArte 1.1.7 Patch Testing
Post by: ahrasis on April 23, 2021, 05:52:57 pm
So far that I am concerned, the latest patch is good. No more errors even while using php8.0.
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: forumovod on April 24, 2021, 04:13:26 am
That will be up to the mod authors to test and change if there are any issues.

So, if you do not want to get problems with addons on the forum, then it is not recommended to install patch 1.1.7 ?
I'm trying to get an answer to this question. :)
Title: Re: ElkArte 1.1.7 Patch Testing
Post by: tino on April 24, 2021, 11:29:46 am
That will be up to the mod authors to test and change if there are any issues.

So, if you do not want to get problems with addons on the forum, then it is not recommended to install patch 1.1.7 ?
I'm trying to get an answer to this question. :)

It is recommended to test on a separate install to make sure it all works. Also you should use the latest version as it has some bug fixes, php version compatibility fixes and I think a few security fixes. It’s up to you if you upgrade at the end of the day but it’s recommended you do, the developers here can’t test against all the addons and it’s the mod authors responsibility to ensure it works.