Welcome! I have a problem with displaying error page when category contacts is clicked. I will briefly describe the situation and circumstances:
- I wanted to achieve a fully functional contact form with selection of the person you want to write (description of page + dropdown list to chose contact + contact form on a single page). This is achieved by:
- Each contact (e.g. ContactA, ContactB) is assigned to contact categories (e.g. ContactC);
- Creating a menu item (e.g. ContactUs) with the type: single contact;
- Selecting a "default" contact (Select Contact:) ContactA;
The site looks and functions as it should at this stage of development - after selecting a specific contact - sends a letter where it should be sent (still requires overwriting layout, but not the point).
- When you select (other than default) contact from the dropdown list (ContactB) the page is reloaded - it is necessary to change the recipient.
- Breadcrumbs changes after reloading by adding extra levels - contact and contact categories (e.g. "HOME->ContactUs" to "HOME->ContactUs->ContactC->ContactB"). Which itself doesn't look bad, but I would avoid this levels.
- When a curious visitor clicks on ContactC in breadcrumbs - this page reloads and has an address mypage.com/index.php/contactus/10-contactc/3-contactb where numbers are equivalent to ID of the elements;
- And displays the error message "jos-Error: Contact not found" where error information is in the translation under the label COM_CONTACT_ERROR_CONTACT_NOT_FOUND.
My question is: how to avoid displaying this error? I see three solutions:
- Writing a php function (e.g. in error.php), which detects occurrence of this specific error and (for example) redirects to the start page - I don't know nor references to use or if "I can".
- Turning off in breadcrumbs displaying contact categories (checked in global configuration and contact options, but nothing changes on page).
- Setting in the css specifically for this one link visibility: hidden (or if "I can" php give css class by search for the value of href?).
I've got Joomla 3.4.x and mysql database.