Support Forum

Every time that you post a problem, PLEASE add the Joomla and the extension's versions and revisions (for example: Joomla 3.3.6, Contact Enhanced 3.3.5), PHP version and Server's Operating System. If you only manage only one site it is easier if you edit your profile and just add that information to your signature. Don't forget to add a detailed description of the problem. If possible, write down all steps to simulate the problem.

Before submitting a new post, PLEASE make sure you are running the latest version, test in different browsers (IE, FF, Chrome,..) and clear Joomla and browser's cache after every change you make.

Also, most questions are already answered in our FAQ and in iFAQ and Contact Enhanced documentation pages.

Issue with Mail2CE in Joomla 5

3 months 3 weeks ago - 3 months 3 weeks ago #27235 by yosh
Hi,

I noticed a strange issue on some articles on my J5 site: I was getting a 404 error page instead of the article itself. It was only when I enabled debug mode and full error reporting when I saw a stacktrace with an exception in CE coming from the Mail2CE plugin. The problem was I had enabled the plugin but not configured it (i.e: not selected a contact to use in the plugin configuration). Once I selected a contact these articles with email addresses started loading fine.

IMHO, this is quite an obtrusive approach, since a 404 is quite misleading to the user. Perhaps a Joomla error message either in the frontend on the affected article page or on the backend somewhere would be less invasive and at least the articles would still load.

Just my 2 cents.

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago #27236 by support
This is supposed to be a 404 (not found) error because the contact is not found. We throw an exception because it's easier for the admin to figure out what's the issue.

What I'll do for the next release is to throw an exception only if the debug mode is on, otherwise, I'll show a System message there.

Best regards,
The following user(s) said Thank You: yosh

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago #27237 by yosh
> We throw an exception because it's easier for the admin to figure out what's the issue.

Looking at this stacktrace, I don't necessarily agree. Also, IMHO a 404 makes sense if you select a user that is then deleted or something like that. But if you don't select a user in the first place there is nothing to search for, so well... it depends how you design the API.


In any case your suggestion works for me. The Joomla error would be more intuitive to solve the root cause.
Attachments:

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago #27238 by yosh
Furthermore, I have another problem with the plugin: it only works for the 1st email in the article. Open for example this article , you will see the same email address shows in 3 places in the content. Only the first one opens the CE form in a modal when clicking on it, the other 2 trigger the default mailto behaviour of the browser.

I'm pretty sure the issue occurs because the html for the modal that is inserted around the link is adding the same id attribute value for all instances, and the Javascript that opens the modal is bound to that id, so it only opens the first one, since ids must be unique by definition.

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago #27239 by support
Dear Yosh,

This plugin has been completely rewritten for Joomla 4 and I may have not tested it with the same email address listed multiple times on the same page. This plugin now works with the Content Plugin to create the modal links and since it was the same shortcode, the content plugin replaced it with the first modal window every time.

Anyway, I have just fixed it and I'll send it to you in a minute or two.

Best regards,
Best regards,

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago #27240 by yosh
Thanks a lot, Douglas!

I know it’s impossible to test all edge cases ;) this is totally normal. Thanks for the quick solution!

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Copyright © 2018 IdealExtensions.com. All Rights Reserved.

This site is not affiliated with or endorsed by the Joomla!™ Project. It is not supported or warranted by the Joomla!™ Project or Open Source Matters™. The Joomla!™ logo is used under a limited license granted by Open Source Matters™, the trademark holder in the United States and other countries.
We may collect your IP address and your browser's User Agent string while using our site for security reasons and deriving aggregate information (analytics). This information is retained for a minimum of 1 and a maximum of 24 months.
Feedback