Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Suspected Bugs and Errors - 8

If you suspect you have found a bug or a code error post here.
3,968 posts | Last Activity on 08-08-2019 07:02 by douwe_yntema
douwe_yntema
douwe_yntema 08-08-2019 07:02, 14 days ago
Re: Bug in /messages.php sender_id $_GET['msg_read'] - 1

Use this value in the query.

To set the read flag, use where message_id = sender_id.

You cannot update a record with a join
Wanabo
Wanabo 07-08-2019 21:48, 14 days ago
Re: Bug in /messages.php

douwe_yntema wrote:

@douwe_yntema - The problem is the message for the receiver is an other record in the database than the message from the sender.
I know, so I need to get message_id='".$_GET['msg_read']."' minus 1, there is the message_read value I need. But I can't code it.

Quote

On composing the message you need to put info in the message for the receiver, about the record id for the corresponding record of the sender. On reading the message, set a flag in the record for the sender the message is read. You know the record ID becouse its put in on composing.
As above, this is set in message_id='".$_GET['msg_read']."' minus 1 It needs some mysql joining, but I have a limit understanding of it.
douwe_yntema
douwe_yntema 07-08-2019 19:49, 14 days ago
Re: Bug in /messages.php The problem is the message for the receiver is an other record in the database than the message from the sender.

On composing the message you need to put info in the message for the receiver, about the record id for the corresponding record of the sender. On reading the message, set a flag in the record for the sender the message is read. You know the record ID becouse its put in on composing.
Wanabo
Wanabo 06-08-2019 13:46, 16 days ago
Re: Bug in /messages.php Was trying to add a mod when found a bug in the original code.
Around line 415 there is an if statement without snakehooks. Added them, see below.
Code
"outbox")) {
 $result = dbquery("SELECT m.message_id, m.message_subject, m.message_message, m.message_smileys,
      m.message_datestamp, m.message_folder, u.user_id, u.user_name, u.user_status
      FROM ".DB_MESSAGES." m
      LEFT JOIN ".DB_USERS." u ON m.message_from=u.user_id
      WHERE message_to='".$userdata['user_id']."' AND message_id='".$_GET['msg_read']."'");
 if (dbrows($result)) {
 $data = dbarray($result);
 $result = dbquery("UPDATE ".DB_MESSAGES." SET message_read='1' WHERE message_id='".$data['message_id']."'");
 $message_message = $data['message_message'];
 if ($data['message_smileys'] == "y") { $message_message = parsesmileys($message_message); } // mod Wanabo, added missing snakehooks.
 add_to_title($locale['global_201'].$locale['431']);
 opentable($locale['431']);



Was trying to make it so that in a users pm outbox the messages are displayed bold, that the receiver did not read yet. Very important request from 1 of my users, who uses the pm system a lot and wants to know if a message is read or not.
I FAILED. Who can help?
Wanabo
Wanabo 04-08-2019 15:20, 17 days ago
Re: Page navigator not working after enabling permalinks. Also post preview does not work with quick reply and normal reply with permalinks enabled.
Wanabo
Wanabo 28-07-2019 10:23, 25 days ago
Re: Page navigator not working after enabling permalinks. Didn't change the thread subject, but instead I looked for other threads with no special characters in the thread subject. These have the same bug.
Here are two examples:
https://xs4all.gebruikers.eu/forum/th...ing-row-10
https://xs4all.gebruikers.eu/forum/th...35b-row-30
Chan
Chan 28-07-2019 08:48, 25 days ago
Re: Page navigator not working after enabling permalinks. The url has a "!". Can you confirm with us if you changed the thread subject from FRITZ!Box to FRITZbox, will page navigation work?
Falk
Falk 26-07-2019 17:52, 26 days ago
Re: Page navigator not working after enabling permalinks. Issued, https://github.com/php-fusion/PHP-Fusion/issues/2240
Wanabo
Wanabo 26-07-2019 13:53, 27 days ago
Re: Page navigator not working after enabling permalinks. I have received several reports from my users that the page navigation is not working anymore after enabling permalinks/seo engine. I confirm this bug.
Examples:

https://xs4all.gebruikers.eu/forum/thread/view/787/FRITZ!Box-7581-problemen-row-3460 <-- goes to page 1
Hell, every thing is going to page 1.
Falk
Falk 17-07-2019 14:22, 1 month ago
Re: v8 & permalinks error I am not sure if it crashes before it shows where.
Wanabo
Wanabo 17-07-2019 13:46, 1 month ago
Re: v8 & permalinks error Ok. Tried enabling Debug SEO on a good working site with permalinks / seo engine enabled. But no debug output on the front end.
So Debug SEO is not working as you all ready mentioned.

Just curious. If Debug SEO is fixed, would it show any debug output on a site that is completely blank because of "range out of order in character class at offset 4002"? See also post #3

Quote

After enabling SEO Engine/Permalinks the site goes blank! Except for administration.
Mickelvlm
Mickelvlm 17-07-2019 13:16, 1 month ago
Re: User search for new messages: users.json.php missing I'll think more about pointing out the 8.00.21 side of things, then - although I don't think I've discovered anything that works in .21 but not in .22 yet. pfft

Thanks smile
Falk
Falk 17-07-2019 13:07, 1 month ago
Re: v8 & permalinks error You should see it on front-end there are two bars that resolve and should results. But as mentioned it seems to have stopped work on later 8.
Falk
Falk 17-07-2019 13:00, 1 month ago
Re: User search for new messages: users.json.php missing 8.0.22 is not released so it may have glicthes as you describe, the file should be placed in \includes\jscripts\select2 , but you mention it was already removed in .20 so it seems strange, perhaps just a miss. I´ll digg in to it. Thank you for the report. Downloading an older pack and placing the file in there should fix it tho.
Mickelvlm
Mickelvlm 16-07-2019 22:20, 1 month ago
Re: User search for new messages: users.json.php missing 8.00.22 - when I open /messages.php?msg_send=0 it wants me to enter part of a username to search for. However, when I do, nothing happens, and it prevents me from just typing in the full username myself. As a result, I'd have to find a direct link for messaging a specific user.

I found that it uses the file users.json.php, but this file doesn't exist anymore. The exact line of code can be found in maincore.php.

users.json.php was removed in 8.00.20. I'm not sure why, but the last mention is in this thread, around the time it was removed.
Wanabo
Wanabo 16-07-2019 11:50, 1 month ago
Re: v8 & permalinks error Yes normalize is enabled.
Where should the overlay occur?
After enabling SEO Engine/Permalinks the site goes blank! Except for administration.
Is there a way to figure out what character is at offset 4002?

Quote

range out of order in character class at offset 4002
Falk
Falk 16-07-2019 11:26, 1 month ago
Re: v8 & permalinks error Have you tried to enable Normalize?, it strips special chars that can fail in urls
The debug is not popping it´s overlay in 8.0.22, i´ll make a report on that one.
Wanabo
Wanabo 15-07-2019 15:13, 1 month ago
Re: v8 & permalinks error Enabled permalinks on 11 sites now, but number 12 and 13 won't work. I find this in my error log.


Code
Error:    preg_replace(): Compilation failed: range out of order in character class at offset 4002    Line:    91
File:    PHPFusion/Rewrite/Permalinks.inc    On Page:    /index.php
User-Level:    103



Code
ource code (Line: 81 - 101)
81     }
82    
83     /**
84     * Do full replacement of the HTML output
85     */
86     private function replace_output() {
87     // Pattern translation
88     if (!empty($this->regex_statements['pattern'])) {
89     foreach ($this->regex_statements['pattern'] as $handler => $rules) {
90     foreach ($rules as $search => $replace) {
91     $this->output = preg_replace($search, $replace, $this->output);
92     }
93     }
94     //print_p($this->output);
95     }
96    
97     // Alias translation
98     if (!empty($this->regex_statements['alias'])) {
99     foreach ($this->regex_statements['alias'] as $handler => $rules) {
100     $_patterns = flatten_array($rules);
101




Did some searching myself but can't find the problem. Probably an unescaped character that's messing things up.
[google]https://www.google.com/search?q=preg_replace%28%29%3A+Compilation+failed%3A+range+out+of+order+in+character+class+at+offset&ie=utf-8&oe=utf-8[/google]

Where are the patterns set? In includes\classes\PHPFusion\Rewrite\Permalinks.inc?
What does "Debug SEO Toggle to start SEO Engine Debugger" do? Where can I find output of this debugger?
Wanabo
Wanabo 14-07-2019 15:01, 1 month ago
Re: v8 & permalinks weird rewriting. Yes I noticed the extra use of BASEDIR in v8.

When I compare a non enabled permalinks v8 site I see less in the source code while the url is similar.
But as stated in my opening post, the permalinks are working. If that is normal behavior then I have peace of mind.

https://ziggo.gebruikers.eu/forum/viewthread.php?thread_id=5297&pid=36826#post_36826

Falk
Falk 14-07-2019 14:47, 1 month ago
Re: v8 & permalinks weird rewriting. The permalink work vs real server URL hence all them dots. You can see in many various places how we also have been forced to redefine and use BASEDIR in many scenarios when the Rewrite engine is on.
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.