xertion
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: the_post() returns pages and autosaves with PHP 5.3I found the query of the PHP 5.2 site. It’s the following:
“SELECT SQL_CALC_FOUND_ROWS distinct jj_posts.* FROM jj_posts LEFT JOIN jj_term_relationships ON (jj_posts.ID = jj_term_relationships.object_id) LEFT JOIN jj_term_taxonomy ON jj_term_taxonomy.term_taxonomy_id = jj_term_relationships.term_taxonomy_id WHERE 1=1 AND jj_posts.post_type = ‘post’ AND (jj_posts.post_status = ‘publish’) AND NOT EXISTS (SELECT * FROM jj_term_relationships JOIN jj_term_taxonomy ON jj_term_taxonomy.term_taxonomy_id = jj_term_relationships.term_taxonomy_id WHERE jj_term_relationships.object_id = jj_posts.ID AND jj_term_taxonomy.taxonomy = ‘category’ AND jj_term_taxonomy.term_id IN (23) ) ORDER BY jj_posts.post_date DESC LIMIT 0, 10”
How can PHP 5.3 change all that to one line?
“SELECT SQL_CALC_FOUND_ROWS distinct jj_posts.* FROM jj_posts WHERE 1=1 ORDER BY jj_posts.post_date DESC LIMIT 0, 10”Forum: Fixing WordPress
In reply to: the_post() returns pages and autosaves with PHP 5.3I noticed that “WHERE 1=1″ seems to be the problem. The correct would be WHERE post_status=”publish” AND post_type=”post”.
Someone told me that by default the query sends these “WHERE’s” but something on the site seems to be removing it.
Is this true? Does the query by default send those WHERE parameters? Also, what could remove it? And why would it only be removed at PHP 5.3 and not at PHP 5.2? =/
Forum: Fixing WordPress
In reply to: the_post() returns pages and autosaves with PHP 5.3I did some more research and I returned the SQL query that The Loop was sending to the database to retrieve the posts.
The query was
SELECT SQL_CALC_FOUND_ROWS distinct jj_posts.* FROM jj_posts WHERE 1=1 ORDER BY jj_posts.post_date DESC LIMIT 0, 10It returns revisions and also pages. Why is this?
Forum: Fixing WordPress
In reply to: the_post() returns pages and autosaves with PHP 5.3As I stated in the first message, there was another developer who created the website itself and now I’ve taken over the site since the company dont work with him anymore.
The code for the list is in the pastebin that I linked, what do you mean by any other custom queries? There’s not much more out of the ordinary in the index.php file.
Forum: Fixing WordPress
In reply to: the_post() returns pages and autosaves with PHP 5.3Is there any more information that you need to be able to help me? No one else is having these kind of troubles with PHP 5.3?
Forum: Plugins
In reply to: Anybody used Xlanguage with Nextgen?I got the same problem. I’m using xLanguage but it doesnt print my gallery in the secondary language. I’m not using Nextgen though and I would really appreciate the solution.