Skip to content

[fix] #5554, Adding tags when editing articles.#5601

Closed
jackkum wants to merge 1 commit intojoomla:stagingfrom
jackkum:fix-5554
Closed

[fix] #5554, Adding tags when editing articles.#5601
jackkum wants to merge 1 commit intojoomla:stagingfrom
jackkum:fix-5554

Conversation

@jackkum
Copy link
Copy Markdown
Contributor

@jackkum jackkum commented Jan 3, 2015

#5554 and #5455

@infograf768
Copy link
Copy Markdown
Member

@test
This works here. Will close #5554 and #5455

@waader
Copy link
Copy Markdown
Contributor

waader commented Jan 5, 2015

@test success!

@wilsonge
Copy link
Copy Markdown
Contributor

wilsonge commented Jan 6, 2015

This might fix the issue but is a horrific hack. This effectively nulls the entire where statement. In which case you may as well remove it all together (but not sure if that is the right answer either)

@jackkum
Copy link
Copy Markdown
Contributor Author

jackkum commented Jan 6, 2015

@wilsonge
Agree it is a crutch.
Another solution can only see in union 2 queries.

@jackkum
Copy link
Copy Markdown
Contributor Author

jackkum commented Jan 6, 2015

Why not use "where" like zf?
https://github.com/zendframework/zf1/blob/master/library/Zend/Db/Select.php#L473
All the conditions are combined by a single operator (and, or) it is not convenient.

@wilsonge
Copy link
Copy Markdown
Contributor

wilsonge commented Jan 7, 2015

@jackkum
Copy link
Copy Markdown
Contributor Author

jackkum commented Jan 7, 2015

it is apply for all where conditions.

$query = $db->getQuery(true);
$query->select('*');
$query->from('...');
$query->where('cond', 'OR');
$query->where('cond1', 'AND');
$query->where('cond2');
// result will be select * from ... where cond OR cond1 OR cond2

@jackkum
Copy link
Copy Markdown
Contributor Author

jackkum commented Jan 7, 2015

on zf this will be

$query = $db->select();
$qurey->from('...');
$query->where('cond');
$query->orWhere('cond1');
$query->where('cond2');
// result will be select * from ... where (cond) OR (cond1) AND (cond2)

@gunjanpatel
Copy link
Copy Markdown
Contributor

Agree with @jackkum here. We have second argument but it applies to all where. So, if we want to write query with AND and OR condition together it's somehow not possible in current where function.
We need orwhere or andwhere functions. But not agree with this changes. This should be improve in other way. :)

@Joomti
Copy link
Copy Markdown

Joomti commented Mar 14, 2015

For me it works as it should.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5601.

@wilsonge
Copy link
Copy Markdown
Contributor

I'm closing this as it's completely the wrong fix as I described. We need to rewrite this query properly rather than adding this statement

@wilsonge wilsonge closed this Mar 14, 2015
@vdespa
Copy link
Copy Markdown

vdespa commented Mar 14, 2015

I am not very familiar with the internals of com_tags, but this seems rather like a limitation and not a bug. You can later add tags if you write 3 letters from the tag it will be displayed.

If this PR is not updated in the next 30 days, it would be closed, as it cannot be merged in the current state.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5601.

@wilsonge
Copy link
Copy Markdown
Contributor

@vdespa i think you are commenting on the wrong issue ^.^

@jackkum jackkum deleted the fix-5554 branch March 20, 2015 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants