Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

Edit in frontedd fails - Duplicate Alias
(1 viewing) (1) Guest
Support forum for users using free edition of JoomSEF 4 (Joomla 1.6/1.7/2.5+ compatible). These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1
  • 2

TOPIC: Edit in frontedd fails - Duplicate Alias

Edit in frontedd fails - Duplicate Alias 12 years, 10 months ago #26962

Using:
Joomla: 1.7.3
ARTIO JoomSEF: 4.2.3
PHP Version 5.3.2-1ubuntu4.10

I have been unable to edit articles in the front end. In my Apache logs I found the following:

PHP Notice: Undefined variable: task in /site/ukrgb/joomla/components/com_sef/sef_ext/com_content.php on line 369, referer: beta.homedomain/books/bookshop-the-front-window

Looking at: components/com_sef/sef_ext/com_content.php the variable is not initalised, which explains the error.

A quick and dirty hack is to comment out the offending switch statement and always call the edit
case. This seems to work, but I'm sure its not the correct solution.

The code becomes:
 
default:
/* switch($task) {
case 'article.add':
$title[]=JText::_('COM_SEF_NEW');
break;
case 'article.edit':
*/

$this->nonSefVars = array();
$this->nonSefVars["return"]=@$return;
if(isset($a_id)) {
$title=array_merge($title,$this->_getArticle($a_id));
}
$title[]=JText::_('COM_SEF_EDIT');
/* break;
}
*/

break;
 

Re: Edit in frontedd fails - Duplicate Alias 12 years, 10 months ago #27032

  • dajo
  • OFFLINE
  • Posts: 5069
Hi,
Correctly it should look like:
default:
switch(@$task) {

with the @ character before $task. Maybe some update didn't go well on your server?
ARTIO Support Team

Re: Edit in frontedd fails - Duplicate Alias 12 years, 10 months ago #27043

Thanks for the reply, I will try that later.

I have just checked the zip file I downloaded and the "@" is missing from there as well so its not a n update issue. The .zip i used was com_joomsef4-2.2.2.zip, (i.e. not 4.2.3 as previously stated). I cannot find 4.2.3 to download so I guess its not available.

MarkG

Re: Edit in frontedd fails - Duplicate Alias 12 years, 10 months ago #27059

dajo wrote:
Hi,
Correctly it should look like:
default:
switch(@$task) {

with the @ character before $task. Maybe some update didn't go well on your server?


This did not work, when editing articles I still get the error:
"Save failed with the following error: Another article from this category has the same alias"

From my limited knowledge of PHP isn't the "@" just masking the error so it will still fail as task is not defined?

Re: Edit in frontedd fails - Duplicate Alias 12 years, 10 months ago #27095

  • dajo
  • OFFLINE
  • Posts: 5069
Yes, @ just masks the error, I thought the notice was causing the problem.

Well the edit URL on my test server looks like this:
index.php?option=com_content&task=article.edit&a_id=69&return=aHR0cDovL2oxNy8=&Itemid=435

What does your edit URL look like? If it's SEF, please also post the corresponding Real URL from Manage SEF URLs page in JoomSEF.
ARTIO Support Team

Re: Edit in frontedd fails - Duplicate Alias 12 years, 10 months ago #27117

I have the "view=form" in my "Do not SEF URLs" for the content module to prevent jumping back to the home page after editing. Removing this solves the problem (edit works), but it is extremely annoying that you are thrown back to the home page after every edit.


With "view=form" in my "Do not SEF URLs ": (with this the edit fails)

The Edit button:
beta.homedomain/books/bookshop-the-front-window/edit?return=aHR0cDovL3VrcmdiLWJldGEuaG9tZWRvbWFpbi9ib29rcw==

The URL whitest editing:
beta.homedomain/?option=com_content&view=form&layout=edit&a_id=5&Itemid=106&return=aHR0cDovL3VrcmdiLWJldGEuaG9tZWRvbWFpbi9ib29rcw==

From JoomSEF URL Management:
books/bookshop-the-front-window
index.php?option=com_content&catid=9&id=5&view=article&Itemid=106


With nothing in my "Do not SEF URLs ": (with this the edit succeeds but throws you back to the front page)

The Edit button:
beta.homedomain/books/bookshop-the-front-window/edit?return=aHR0cDovL3VrcmdiLWJldGEuaG9tZWRvbWFpbi9ib29rcw==

The URL whitest editing:
beta.homedomain/component/content/?view=form&layout=edit&a_id=5

From JoomSEF URL Management:
books/bookshop-the-front-window
index.php?option=com_content&catid=9&id=5&view=article&Itemid=106

Thanks for looking in to this

Mark G
Last Edit: 12 years, 10 months ago by MarkG.
  • Page:
  • 1
  • 2
Přihlášení uživatele Prázdný