Recent Topics

1 Oct 02, 2018 14:58    

Hello,

when I get a system mail that pushes me to have a look on post moderations, the link building sucks:

This is the set link:
https://www.***.net/htsrv/email_passthrough.php?email_ID=2003…

instead of
https://www.***.net/blogs/htsrv/email_passthrough.php?email_ID=2003…

although the $base_url is set correct $baseurl = 'https://www.***.net/blogs/

Is there a fix? (I can't remember that this link failure has happend before upgrading to 6.10.2)

Regards, Will

2 Oct 04, 2018 22:51

Is it for all emails or only for a specific email template?

5 Oct 12, 2018 15:28

Hello @saunders, I have tested version 6.10.2 with $baseurl = 'https://b2evo.local/blogs/ and couldn't reproduce your problem, i.e. in all cases I get a correct url like https://b2evo.local/blogs/htsrv/email_passthrough.php?email_ID=.

It would be good if you show us what settings you have for "Assets URLs / CDN support" - https://b2evolution.net/man/assets-url-cdn-settings.
Also if you changed the default values of the vars $htsrv_url and $htsrv_url_sensitive in /conf/_advanced.php then please show what you have there.

I would like to advice you to update to 6.10.3 version because there we did modifications especially in functions which work with htsrv urls with https protocol.

6 Oct 15, 2018 16:04

@yurabakhtin thanks for your reply. I checked "Assets URLs / CDN support" and also vars $htsrv_url and $htsrv_url_sensitive in /conf/_advanced.php . There is nothing that could cause this, because I never changed the vars.

What is interesting is, that the link building is correct in e-mail messages which informs about editing a post etc.
For moderation post or remembering messages for having not logged in for xyz the link worked also pretty fine up to 6.9.7. But now after upgrading to 6.10.x there is that problem on this instance.

I updated to 6.10.3 as you have advised and I will see wether the problem persists or not. I'll give a feedback within the next week.

Regards, Will

7 Oct 18, 2018 15:30

@yurabakhtin ok I upgraded to 6.10.3 and checked again what you advised. But the linkbuilding fails within moderation messages ("Send reminders about posts awaiting moderation") as well as in "Send reminders about inactive accounts" !

But, the linkbuilding is correct in messages annoucing editing of a post.
So I presume it is not a Question of a single Collection, but of the System.

Nevertheless I'll send the "Assets URLs / CDN support" screenshot. This shows a correct Url of htsrv (see fig.1)

May be this observation helps:
In the "reminders about posts awaiting moderation" there is a name mentioned (see fig.2), which does not show up in users list (see fig 3).

Regards,Will

8 Oct 24, 2018 19:51

@yurabakhtin the problem only occurs when general system messages are sent. After 'reminders for post moderation', 'reminders of inactive accounts' the link building bug comes also with 'Stale contents found in …"- The link building bug does not occur in messages sent by collection triggers, like messages about editing a post or messages about comments etc.

Is there a fix?

Regards, Will

9 Oct 25, 2018 14:25

@saunders, after reading your comment http://forums.b2evolution.net/wrong-link-building-in-post-moderation#c111719 I think the problem appears only when notification is sent through cron_exec.php. I tested that cron job from command line interface with php cron_exec.php and detected one die error, so for me it was impossible to run cron job in CLI mode at all, so I think you have some different problem when email is sent but urls are wrong. To avoid the detected bug I did a fix in commit https://github.com/b2evolution/b2evolution/commit/91d493babd5f901dda91df0bce382af7adf7eeb5, of course you can apply this fix but I am not sure it will helps, so I still should continue to try to reproduce your issue.

10 Oct 25, 2018 15:41

@yurabakhtin Thnks. I fixed it, but the problem persists.

I checked the protocolls and may be this is helpful for fixing

The b2e CMS runs at: https://www.npo-consultng.net/blogs/ [That is the baseurl]
The different collections are called via .php [like https://www.npo-consulting.net/blogs/notepad.php

In July I set my domain from http to https
To force https the hoster wrote those following lines into the root htaccess file at the end [https://www.npo-consulting.net/.htaccess]

############HTACCESS W4Y START############
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^npo-consulting.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.npo-consulting.net$
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
#############HTACCESS W4Y END#############

May be this causes the link building problem (although I am not really confident.

(The .htaccess fil of b2e is lokated at https//www.npo-consulting.net/blogs/.htaccess)

Is it possible, that some of the messages are affected by this rewrite and other are not?

Regards, Will

PS: I mentioned above, (#7, fig. 2) that in the salutation of the message my name appears doubled. Now I got the reason. The image obviously could not be loaded, that way the alt text is viewed. This means, that the problem of failing in link building may be connected with a rendering problem

11 Oct 26, 2018 13:45

@saunders ok, thank you for new details, but sorry because I still cannot reproduce your issue, you can see my tests on the attached screenshot.

12 Oct 26, 2018 15:41

@yurabakhtin I am running another instance of b2e, located at another host's server. There b2e works fine I. I compared all relevant files and customized edits. I could not detect any critical deviation. May be I have to set up the b2e instance again, because it is an instance I had installed many years ago and have ever and ever updated that installation.Perhaps some old code fragments cause the mismatch.

A last question:
May the version of MySQL cause this? It is 5.5.59-log
or the php version 7.0.32 ?

If not, we can set this thread to standby or close it. The bug hits not vital function.

Regards, Will

13 Oct 26, 2018 16:58

@saunders It doesn't depend on mysql version indeed and php too because in some places you have the correct urls like http://site.net/blogs/htsrv/ but only in some notification emails you have the wrong http://site.net/htsrv/.
Maybe it depends on how the cron_exec.php is executed.

If you have the same version files and probably the same collection settings on different servers then I guess it depends on some server settings because the urls are built by function get_htsrv_url() where we use global vars $ReqHost, $ReqPath that are generated in the function get_ReqURI() - https://github.com/b2evolution/b2evolution/blob/6.10.2/inc/_core/_misc.funcs.php#L6642-L6749, as you can see there we use global variables like $_SERVER['REQUEST_URI'], $_SERVER['URL'], $_SERVER['PATH_INFO'] and etc. and these vars depend on how the script cron_exec.php is called. I am not sure but probably your server in CLI mode when cron_exec.php is executing doesn't have some of these vars.

Unfortunately but I cannot debug these vars on your server and cannot to reproduce this on my test local server, we can keep this thread for other people who will catch the same issue and probably they give us more details.

Thanks.

14 Nov 02, 2018 11:58

@yurabakhtin my hoster told me, that there should not be a problem with the server settings. But they will control it for the next weeks by special logs.

But another bug may be linked with this problem of wrong linkbuilding:
Since the problem appears I also get System Error Messages because of fulfilling a plan: "The following schedule has enden with an error" : Prune old files from page Cache (I will attach the error information in a pdf)

May be there is a hook inside the system

Regards, Will


Attachments:

15 Nov 02, 2018 16:33

@saunders are you using multiple/different domain names for your various b2evolution blogs/collections?

16 Nov 02, 2018 16:50

@fplanque I am using two different b2e installations on different hosts and with different domains. The installation that fails in link-building is located at: https://www.npo-consulting.net/blogs/ (This installation is a frequently update version, originally set up about 10+ years ago. The other Installation, that works pretty fine, does not date back that old.) This thread relates to npo-consulting.net/blogs/

There is are no subdomains. There are 5 collections with content, one start collection (https://www.npo-consulting.net/blogs/home/) and one gathering collection (https://www.npo-consulting.net/blogs/all.php) all these collections - except home - are called by a php file, like (https://www.npo-consulting.net/blogs/lector.php).

17 Nov 02, 2018 18:10

ok, so if the failing installation is using a single domain, my idea is not relevant, sorry.

18 Nov 02, 2018 18:28

@saunders

Since the problem appears I also get System Error Messages because of fulfilling a plan: "The following schedule has enden with an error" : Prune old files from page Cache (I will attach the error information in a pdf)

This is unrelated. Open another thread if you think this needs to be fixed.

19 Nov 08, 2018 11:15

@fplanque @yurabakhtin Obviously the CLI at my hoster's does not work properly. Although I can not follow the arguments of the hoster's technicians, i have to accept that, because my contractually binding runs till end of summer next year. I made a note of switching to another hoster. But till than I have to find a workaround.
Question: Is there a way to use cron_exec.php from a former version within 6.10.3? (or does this cause mess?)

20 Nov 08, 2018 14:37

@saunders wrote earlier:

Question: Is there a way to use cron_exec.php from a former version within 6.10.3? (or does this cause mess?)

No, because the cron_exec.php uses many other functions from other files.

22 Nov 19, 2018 11:08

@yurabakhtin Great, that fixed it. Now the link-building works great! Thanks and Regards, Will


Form is loading...