PostgreSQL - article latest module error#8243
Merged
roland-d merged 3 commits intojoomla:stagingfrom Nov 3, 2015
alikon:patch-47
Merged
PostgreSQL - article latest module error#8243roland-d merged 3 commits intojoomla:stagingfrom alikon:patch-47
roland-d merged 3 commits intojoomla:stagingfrom
alikon:patch-47
Conversation
Contributor
There was a problem hiding this comment.
@alikon we need to use here: 'random' => JFactory::getDbo()->getQuery(true)->Rand(), without the ' at the end ;)
Else we get: Parse error: syntax error, unexpected '',' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in JROOT/modules/mod_articles_latest/helper.php on line 106
Contributor
|
I have tested this item ✅ successfully on ca3fbb3 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8243. |
Contributor
|
I have tested this item ✅ successfully on ca3fbb3 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8243. |
Contributor
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8243. |
Contributor
There was a problem hiding this comment.
Why are you getting a new DB object when on line 37 there is already a $db. So you can improve this by doing:
$db->getQuery(true)->Rand();
used already present $db object a per comment
|
This PR has received new commits. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8243. |
Contributor
Author
|
modifyied for using already present $db object as per @roland-d comment |
roland-d
added a commit
that referenced
this pull request
Nov 3, 2015
PostgreSQL - article latest module error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Steps to reproduce the issue
Set the Articles - Latest module parameter Order to Random Article
Click on Latest Articles item from the fronted left menu All Modules
Actual result
you got an error message
Addictional Comments
similar to #8238,#8240,#8242