Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Weston Miller
@kk6mrp
I'm experiencing the issue ever since upgrading PHP to 8.0.17
Weston Miller
@kk6mrp
According to the changelog, that PR was first included in the 8.1.4 release
It's been around about a month but more issues concerning it keep popping up on GitHub centering around 10 days ago, likely as the distributions start packaging it.
neildarlow
@neildarlow:matrix.org
[m]
#7953 actually PHP-8.0.10, I left off the final zero.
Weston Miller
@kk6mrp
The initial issue was reported for 8.0.10, yes, but the fix for it was included in 8.0.17 and 8.1.4. The fix appears to have caused the regression we are talking about.
At least it looks very much related in my mind. The folks at #php on irc.libera.chat thought that was not very likely though when we were chatting yesterday
Weston Miller
@kk6mrp
Tested the patch and it does fix the issue.
neildarlow
@neildarlow:matrix.org
[m]
Cool. Hopefully it will be put into an upcoming release soon.
Weston Miller
@kk6mrp
I agree
marclaporte
@marclaporte:matrix.org
[m]
This is unusual: jasonmunro/cypht#562
neildarlow
@neildarlow:matrix.org
[m]
That library is required for 2FA module QR-Code generation, right?
I already patch it out of composer.json because the GD library dependency is a bit heavyweight for me.
1 reply
Jason Munro
@jasonmunro
FYI the content encoding issue in PHP 8 can be mitigated by disabling zlib compression, which I just did in the master branch
neildarlow
@neildarlow:matrix.org
[m]
jasonmunro (Jason Munro) Is this a case of browsers being broken with compression applied or are we lacking a necessary response header to keep them happy?
neildarlow
@neildarlow:matrix.org
[m]
Anyhow. I can confirm that disabling compression fixes the issue. It also confirms that php_version_compare works on my system in this context.
Talking of which, the super-globals clearing function will need a revisit due to the the issue being addressed twice - once with the php_version_compare (which doesn't appear to work for me) and then with the iterative unset() of the variables. The php_version_compare could now be removed.
Marc Laporte
@marclaporte_gitlab
jasonmunro/cypht#562 solved by Elvis Ans and @jasonmunro
neildarlow
@neildarlow:matrix.org
[m]
marclaporte_gitlab (Marc Laporte) Interesting that the GD library which is needed for 2FA is marked as a suggests in composer.lock but the top-level libraries are required. Could they not all be marked as suggests?
Elvis Ansima
@ElvisAns
In that case we will only need to move some dependency from required to suggest right?
So all extensions by the way.... like mbstring,openssl etc or just dependencies needed in 2FA?
neildarlow
@neildarlow:matrix.org
[m]
ElvisAns (Elvis Ansima) Some research required. If a module is optional then I would suggest the external libraries needed to use it should not be a hard requirement e.g. if you don't want 2FA then no need for QR-Code/Barcode/GD support either.
Elvis Ansima
@ElvisAns
@neildarlow:matrix.org you are right!
What does @jasonmunro says about this idea?
Jason Munro
@jasonmunro
I agree, optional module sets can have optional dependencies in composer
marclaporte
@marclaporte:matrix.org
[m]
And if user tries a feature when dependency is missing: there should be a helpful (and maybe even friendly) error message
Elvis Ansima
@ElvisAns
Yes! It is the right way to handle such situation
Weston Miller
@kk6mrp
@jasonmunro Is there a good way to limit feeds in the everything view? It would be nice to show the latest x feeds and/or limit them by recency, they seem to crowd out emails. Limiting the everything source count doesn't really help because the feeds still overpower the emails. Probably because I don't get enough emails every day.
Jason Munro
@jasonmunro
no built in way I'm afraid, if you want to hack the code you can change $limit here: https://github.com/jasonmunro/cypht/blob/master/modules/feeds/modules.php#L204
Weston Miller
@kk6mrp
Ah, thanks!
Weston Miller
@kk6mrp
That's strange, I don't know if it is just me or not but I just realized that the feeds in the everything view don't respect the limit.
Weston Miller
@kk6mrp
s/don't/doesn't
Jason Munro
@jasonmunro
seems to be working for me (manually changing the line above) though it looks like it has a 1 off bug, If I set it to 3 I only see 2 in a test "everything" page
Weston Miller
@kk6mrp
This is with PHP 8.0.17 on the master branch, I haven't tried any other versions. One strange thing I noticed is that the First Page after Login is stuck at "None" and it won't save if I try to. I tried a bunch of other settings and didn't have any issue with those saving. So when I log in I get shown "Home" no matter what.
Weston Miller
@kk6mrp
I reverted back to here: jasonmunro/cypht@8a7484c before all the PHP 8.1 fixes and now it is working.
Weston Miller
@kk6mrp
Well... That is really strange, after I reverted I tried bisecting back up to master and couldn't find anything. I'm going to have to keep testing
neildarlow
@neildarlow:matrix.org
[m]
kk6mrp (Weston Miller) Feed handling is a bit fragile. I've got one that won't delete. I think it's because it has a punctuation character (') in the name.
marclaporte
@marclaporte:matrix.org
[m]
folks: when people are stuck in Github issues that unreproducible, I ask them to come to this room, where a junior dev will troubleshoot with them.
Marc Laporte
@marclaporte_gitlab
Marc Laporte
@marclaporte_gitlab
I expect activity of this chat room will increase thanks to: jasonmunro/cypht-website#21
Steven
@steven3k_gitlab
Hello! I'm the author of this comment https://github.com/jasonmunro/cypht/issues/439#issuecomment-1120485927 (Cypht fails to archive mails from the unified inbox view). Sorry for taking a while to join. Please tell me how I can help troubleshoot
Marc Laporte
@marclaporte_gitlab
Welcome to chat @steven3k_gitlab
marclaporte
@marclaporte:matrix.org
[m]
jeanpaulHamuli (jeanpaulHamuli): will coordinate with you
Steven
@steven3k_gitlab
Thanks! @marclaporte:matrix.org
marclaporte
@marclaporte:matrix.org
[m]
Jean-Paul is a fast-learning junior developer and this is a good learning opportunity
So he needs access to a system which has the issue, where he can put debugging code. So can you reproduce in a place with no confidential info?
Steven
@steven3k_gitlab
Uuuh, not really :/ The issue is happening on my self-hosted email server.
However I am happy to modify the code as needed, if that's not too cumbersome :/
Steven
@steven3k_gitlab

I might have found something. Around line 918 (I have edited the file, so it might be off a couple of lines) of the file modules/imap/handler_modules.php there is an if statement that reads:

elseif ($form['action_type'] == 'archive' && $archive_folder && $archive_folder != hex2bin($folder))

The condition is not met because $archive_folder is unset.
This is because, around line 892 of the same file, this test fails:

if (array_key_exists($server, $specials)) {
Steven
@steven3k_gitlab

I believe to have fixed the issue, perhaps somebody more familiar with the code can review the change?

I replaced the body of the following if statement (around line 890):

            if ($form['action_type'] == 'archive') {

with:

                if(array_key_exists('archive', $specials)) {
                    if($specials['archive']) {
                        $archive_folder = $specials['archive'];
                    }
                }

I essentially copied the code referring to the trash folder just above. It seems that the previous code expected $specials[$server]['archive'] to exist but, at least in my case, $specials already refers to one specific server.

jeanpaulHamuli
@jeanpaulHamuli

Jean-Paul is a fast-learning junior developer and this is a good learning opportunity

Thank you @marclaporte:matrix.org for this good learning opportunity, Welcome in the room @steven3k_gitlab

Steven
@steven3k_gitlab
Thanks! @jeanpaulHamuli
jeanpaulHamuli
@jeanpaulHamuli
Steven's change solves the problem, maybe a review to check if it won't block something else