[Tiki-devel] BASE URL in console context

Adrien Maloba <[email protected]>
Newsgroups gmane.comp.cms.tiki.devel
Message-ID <CAA83xJAc7oyqUkOiZEH-EHdnYYV4b6RfOm8OZRcwxwnh+TCkeg@mail.gmail.com>
Hi all,

When receiving an email that asks for approval of the PluginApproval in a
wiki page, you will notice that the links that lead to the page where the
change is pending approval and the link that leads to the list of other
pages pending approval do not lead to the correct pages in 2 cases:
- When the email is opened in another web client than Tiki Webmail
- When the sending of emails is triggered by a command in console mode.

The problem is that the global variable $base_url is not correct when
launching the command in console, there is no HTTP_HOST or SERVER_NAME
variables coming from the environment.

Following a recommendation from Victor, to solve the problem, I added a
line of code that allows to store the Base URL in the preferences table
before using it when approval emails are sent.

Maybe you have already encountered some difficulties to access the URL Base
in console.
Please, do you have any ideas, suggestions on how we can exploit this
preference? Maybe you have helpful insights on how to do it as a generic
Tiki feature.

Here https://gitlab.com/tikiwiki/tiki/-/merge_requests/2373 the link of
merge request about the incorrect links in email.

Attached is a screenshot that shows an example email.

Thank you!

_______________________________________________
TikiWiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
links.png (image/png, 7.6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.