Thanks, Klas, for answer.
Really, the most cases of using such froms in modules is sending messages or something similar with redirect to
current page. My form is existing on all pages of site - so, I can't choose any menu item in form setting.
About your test - in my case link is '/component/cck' without some postfixes... I found also that another guys can't replay my case - they have normal link...
I tried to change module template with this code:
$app = JFactory::getApplication();
$menu = $app->getMenu();
$menuItem = $menu->getActive();
$uri = JUri::getInstance($menuItem->link);
$query = $uri->getQuery(true);
if (isset($query['option']) && isset($query['view']) && $query['option'] == 'com_content' && isset($query['view']) == 'article') {
$comp = 'com_content';
} else {
$comp = 'com_cck';
}
echo ( $config['action'] ) ? $config['action'] : '<form action="' . JRoute::_('index.php?option=' . $comp) . '" autocomplete="off" enctype="multipart/form-data" method="post" id="' . $formId . '" name="' . $formId . '">';
Link is correct with this code, but submit redirects to 404 page.
I need temporally solution for this time...