* warning: Missing argument 1 for privatemsg_list() in .../sites/all/modules/privatemsg/privatemsg.module on line 375.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 25' at line 1 query: pager_query /* pager_query */ SELECT pmi.thread_id, MIN(pm.subject) as subject, MAX(pm.timestamp) as last_updated, MAX(pmi.is_new) as is_new, GROUP_CONCAT(DISTINCT author SEPARATOR ",") as author FROM pm_message pm INNER JOIN pm_index pmi ON pm.mid = pmi.mid WHERE (pmi.uid = 1) AND (pmi.deleted = 0) GROUP BY pmi.thread_id ORDER BY LIMIT 0, 25 in .../sites/all/modules/privatemsg/privatemsg.module on line 400.
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | privatemsg_fallback.patch | 2.6 KB | naheemsays |
| #25 | privatemsg_fallback.patch | 2.61 KB | naheemsays |
| #23 | privatemsg_fallback.patch | 2.57 KB | naheemsays |
| #17 | 430948.fallback.patch | 2.03 KB | berdir |
Comments
Comment #1
berdirClear the menu cache, that should solve that.
Comment #2
berdirComment #3
csc4 commentedSorry to reopen this - but I've got this error too - I've tried resetting the cache via the performance menu but it doesn't seem to have solved the problem?
The Order by clause does seem to be empty.
Comment #4
berdirYou need to reset the menu cache, which is done by visiting admin/build/modules or update.php
Comment #5
csc4 commentedIf it helps - I got the function to print the status of the $ORDER_BY when on the messages
Which is presumably the problem - but I'm not sure where it's getting set - the call is just
from
Can't seem to figure out the last part...
Comment #6
csc4 commentedThanks for the quick reply.
I always run update after upgrading a module, but to be sure I've gone to admin/build/modules and re-run update just to extra sure and I've still got the problem.
Comment #7
berdirThis is a cache issue, I'm 100% sure ;)
This is most probably a theme cache issue, try to re-save the module list at admin/build/modules, afaik only resaving rebuilds the theme cache. Or clear the cache with the Devel module.. or truncate all cache_* tables in your database.
Comment #8
csc4 commentedI'm glad you're so confident ;)
I've tried truncating re-saving the module list - haven't got the Devel module installed but could try that - and I truncated the cache tables, and it didn't appear to make any difference.
Then I thought some more and remembered there was an issue some time back with theme caches when using an admin theme different from the site theme.. which I have.
So I tried changing the site theme from Marvin to Garland and the link works in Garland, but changing the site to use Marvin for both it still seems not to work? So is it possible it could be an issue specific to Marvin? or just that the Marvin cache somehow still has something in it I can't clear?
Comment #9
csc4 commentedOne more data point - I tried enabling a theme I haven't used at all before for the site - chameleon and it is showing the error.
Comment #10
berdirOh, now I see the problem ;)
theme patterns are only supported by phptempate. And marvin (and marvin is a sub theme of chameleon) doesn't use that, it seems.
Comment #11
csc4 commentedAh. Is that good news or bad?!?!?!?
I think I'm a bit confused as to how themeing affects the content of the form array? Can I work around it or will it need a code change to fix?
The problem seems to be that the term isn't empty but it doesn't have actual content so will a change to the order by fix it?
Comment #12
berdirThis is bad news. ;)
The table header and fields are built using theme pattern functions, a feature that is not supported by Marvin/Chameleon. And these table headers are used to build the ORDER BY query part. But because they aren't found with your theme, a empty order by part is added which breaks the query.
We need to discuss if and how to support these themes..
Anyway, I can only suggest you to use a more modern theme for now, almost any you can find on d.o are based on phptemplate and Marvin/Chameleon was removed in Drupal7 already...
Comment #13
naheemsays commented@csc4 - Just curious, but are you using an unmodified version of marvin, or did you use it as a base theme to build on?
EDIT
If its only the basic theme used, you may want to try converting the linked version in #119929: Chameleon/Marvin converted to PHPtemplate to Drupal 6 and using that.
Comment #14
naheemsays commentedI think there needs to be a note on the project page informing users of this issue - it is pretty important.
Comment #15
csc4 commentedIt's unmodified, I'll have a look at either converting or switching it out thanks.
@Berdir thanks for the news - albeit bad ;)
As a workaround is it possible the code could check for the false line and remove it?, as it would be better if it gave the list without headers rather than dying!
Comment #16
berdirHm, we could probably fallback to the default, hardcoded header and content list if nothing has been returned.
Comment #17
berdirTry the attached patch.
It does simply fallback to the default table if the dynamic stuff doesn't work if for example the theme doesn't support it.
Comment #18
naheemsays commentedTested and it works.
Comment #19
naheemsays commented@ litwol - this patch has been more than just tested and it worked - I had to ask Berdir some questions on irc to get a full explanation too, so it has been thoroughly vetted.
I think this is ready to be committed asap.
Comment #20
litwol commentedChanging settings on admin/settings/messages for 'Configure listings' does almost nothing on the message listing page.
Disabling 'participants' actually removes the participants from the message listing pages, but does not remove the participants header.
Disabling/Enabling other fields does nothing visible.
However the basic message listing works :)
Comment #21
naheemsays commentedThat is the whole point behind this patch - a fallback for people not using phptemplate based themes. They get what they pay for, but atleast it works.
EDIT - yeah, seen the bug. I knew I would invite wrath from *somewhere* for trying to get this pushed through.
Comment #22
litwol commentedMaybe documentation on the settings page saying this wont work for non phptemplate themes with a link to 'wtf is phptemplate theme'
Comment #23
naheemsays commentedOK, I made the above stuff work - I guess discriminating against people with lesser themes is not a good thing :p
This is a more complete patch that allows the selection of other column data to work too.
I have also removed:
from phptemplate_privatemsg_list_field__participants() as that seems to be not needed and also, we do not have similar fallbacks for any of the other functions.
Comment #24
ilo commentedApplied #23 and tested:
- enable module in chameleon theme.
- switch from garland to chameleon with the module installed.
No notice, no error, no any of the issues at #20
Works fine.
Comment #25
naheemsays commentedA few small fixes for e_strict and one other small change as mentioned by litwol on irc.
Comment #26
berdirI've learned that litwol likes "return once" style, so this could be changed to $header += ... but is really minor.
Other than that, this looks good.
Comment #27
naheemsays commentedrerolled with that fixed.
Comment #28
berdirLooks good to me.
Comment #29
naheemsays commentedFixed by litwol in http://drupal.org/cvs?commit=235784
Comment #31
shivaveepuri commentedChange line
if (!empty($ORDER_BY)) { at around 2144 line to
if (!empty($ORDER_BY) && implode(", ", $ORDER_BY)!="") {