Login to front-end with account with permission to edit articles.
Edit article or just click "Save"
Article is saved with advisory notice
The following warning is displayed:
"Warning
Alias already existed so a number was added at the end. If you want to change the alias, please contact a site administrator"
Article edits are saved (advisory notice displays okay) but "-2" is added to the end of the original alias.
Editing the article's alias in the back-end allows restoration of the original alias.
Joomla 3.4.1
Protostar Template
php 5.3.27
JCK Suite editor
Seems to be reproducible by others, as discussed in Forums here:
http://forum.joomla.org/viewtopic.php?f=706&t=881506
Labels |
Removed:
?
|
Confirm, Brian right it's bug for featured articles.
Confirmed this, indeed on the featured menu item. With muliple edits the odd number edit produces the message, the even number edits don't. Only the first time the alias is changed to -2.
No problem in J336, problem with J340 and j341.
Thank you guys, I confirm all the the above. Sorry I wasn't more specific :-(
Labels |
Added:
?
|
Status | New | ⇒ | Confirmed |
Category | ⇒ | Front End |
#4316
The "isNew-Check" in line 507 of ContentModelArticle fails, because (int) $input->get('id') returns 0 when editing an article from featured view.
Perhaps we could use $data['"id"] instead of $input->get("id") to solve this problem.
But i didnt spent a lot of time debugging/testing this and i didnt find the reason why this happens only every 2nd save attempt and only when the menu type is featured.
I will look into this in more detail tomorrow.
I confirm that changing to
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $data['id'] == 0)
solves the issue here.
In my opinion, there is no good reason to use input->get("id") rather than $data["id"] coming from the controller.
When you edit an article from the featured view, $input->get("id") is null and the "isNew-Check" fails.
When you edit from a category blog view $input->get("id") holds the categoryId and not the articleId... so even if it does not lead to errors in that case... its still the wrong value and could lead to errors and bugs in the future.
So if no one has any objection, i would create the pr to fix this.
P.S. The same applies to $input->getInt('id') at line 487.
Thanks @dneukirchen i'm closing here as we have a PR #6640
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-04-03 09:37:59 |
I can only replicate this when the menu type is featured articles. Everything is fine when editing a single article or a blog category