• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

html/plain parts swapped in the email sent by juser plugin?

mauro

Member
Hi, I'm using the juser plugin for a customized registration form, with the following params:

Code:
Bypass activation     NO
Bypass registration  YES
Account details email NO
Bypass all email      NO
Password Reset        NO

Allow User Registration is set to NO in the joomla settings, because I don't want to use the standard registration form of joomla. Instead, in my home page I have a button that links to my customized fabrik registration form (with juser plugin activated).

I noticed that the email joomla sent when an user registers is strange... It has no formatting, it's all written on a single long line and the activation link is just plain text (it's not a clickable link). Then I checked the source of the email message and I see that there are two base64 encoded parts: one is a Content-Type: text/plain; another one is Content-Type: text/html.
The problem is that I can see the message with the right formatting (and I can see the activation link as a clickable one) only if I change my client mail viewing options in plain mode. In html mode the email appears without formatting and without active link. I thought that was something wrong in my mail client, but that was not the case... I tried on various mail client and it's always the same... The email is sent in the right format only if an user registers with the classic joomla user registration form...

Is it possible that the two encoded parts of the email created by the juser plugin are generated with the parts swapped (the "text/html" part should be the "text/plain" part and the other way around)?

Another thing I would like to know is if I can set a customized message after you submit a new user registration from the frontend. For now, with the juser plugin, all I see when I submit the new registration is a simple message of new record added... After the user registers I would like that he/she was informed that he should check its mail to click on the activation link.
 
Hi, FilMar, thanks for your reply, I just tried to make that override in my template, and now I can set 'Allow User Registration' to Yes (and with the override, when I use the link to register from the standard login module of joomla, I am correctly redirected to my customized fabrik registration form) but unfortunately my problem remains: the email sent to the user has no formatting in its 'text/html' part, so it's very ugly and has no active link.
In the juser plugin you also have a field to adapt the success message.
I checked all the options in the juser plugin, but I cannot see a field to change the success message... All I can see when an user registers is a simple record added message.
 
Sorry,

It is for the form that you can change the sucess message (Form Processing tab).

Greetings,

Filip
 
Hi, I managed to solve the problem by a little change in the code of this Fabrik file:

plugins/fabrik_form/juser/juser.php

From line 674:

PHP:
               // Send the registration email.
               if ($emailSubject !== '')
               {
                   $return = FabrikWorker::sendMail(
                       $data['mailfrom'],
                       $data['fromname'],
                       $data['email'],
                       $emailSubject,
                       $emailBody,
                       false /* <--- CHANGED (it was 'true') */
                   );

Now the email is sent as plain text and is correct, being that the registration email sent by joomla is just plain text without html tags, so it doesn't show right if you render it in html mode.

Is it a bug or there is some reason for sending the joomla standard registration email in html format, instead of the expected plain text format?

[...]It is for the form that you can change the sucess message (Form Processing tab).[...]
Nice, thanks!

EDIT: I tried to set a custom success message in the Form Processing tab, but strangely, after the submit of the registration form, it's always shown the default message of added record (and my custom message is not displayed)...
EDIT 2: I tried to unpublish all the plugins I have in my custom registration form, saved the form and then I republished them all and resaved the form. Now my custom success message is displayed correctly after the submit... Strange...
 
Last edited:
Yes, it's strange that no one noticed that... I suppose many Fabrik users send customized html email instead of the default plaintext joomla one (when the user registers with a customized Fabrik form), so they didn't care... Anyway, thank you very much for the correction!
 
Hello, I came across this post, looking for a solution for the (not)html activation mail. Implemented it and it works fine. Good job!
However, I don't receive a administrator mail when using Juser. While I do get a message when using the regular Joomla registration.
Tried several settings in both Joomla User Options and Juser. Hopefully somebody knows the answer for this as well?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top