torvad
Forum Replies Created
-
Forum: Plugins
In reply to: wp_get_current_user not working in 2.9?is_user_logged_in() returns false inside the function &get_posts() which is in query.php
When you edit a post in WP the file admin/post.php is called. I checked and found out that is_user_logged_in() returns true in this file.
Why does it return false inside query.php? I am logged in…
Is there a function that logs off the user when calling this file?
Forum: Fixing WordPress
In reply to: Problems with previewI see. In pluggable.php the current_user gets id = 0, which I guess means that the user is not logged in.
When I display the blog posts, edit.php in wp-admin folder is called and if I put this code in top:
global $current_user;
echo “print user id: ” . $current_user->ID;the id is displayed…
Could it be that a file should be included?
Forum: Plugins
In reply to: wp_get_current_user not working in 2.9?I’m having the same problem. Did anyone find a good solution to the problem?
wp_get_current_user() returns false, and it’s because $current_user is empty.
When you log into WP, in which function or class is this variable instatiated with a user object?
Forum: Fixing WordPress
In reply to: Problems with previewI found out why the preview is not working.
In WP_Query the function is_user_logged_in() returns false. This function is defined in pluggable.php where it calls wp_get_current_user() that returns the global variable $current_user.
It seems strange that this variable is empty since I’m logged in.
When you log into WP, in which class is $current_user given a value?
I’m using WP 2.9.1.
Forum: Fixing WordPress
In reply to: Problems with previewThanks a lot Mark!
“Beyond that, the functions that actually do the selection are methods of the WPDB class.
http://codex.wordpress.org/Function_Reference/wpdb_Class“I will try to look in WPDB class for the function that fetches the post from the database.
Forum: Fixing WordPress
In reply to: Problems with previewBut Mark, is the following right? When WordPress displays a post index.php is first run followed by these files in the following order: wp-blog-header.php ->wp-load.php -> wp-config.php -> wp-settings.php
Since a post should be displayed, there must be a fetch from the database. So from wp-settings.php a file or a chain of files must end up in a function that fetches the post from the database. Which function does this?
Another thing.
Which file or function eveluates the url and determines if a post or posts from a section should be displayed?Forum: Fixing WordPress
In reply to: Problems with previewWell I’d like to find the error so I can fix it…
It must be possible to trace the function calls!I don’t think wp-settings.php is the problem. The error must be in a function or file that is called from wp-settings.php.
The error message I get “Sorry, no posts matched your criteria.” is printed from the file single.php. The error happens because the function have_posts() returns false… I will check if the post is fetched from the database…
Forum: Fixing WordPress
In reply to: Problems with previewI’m using a theme I have customized myself…
Do you mean I should change theme just for the time it takes to look at the preview? In case I don’t know if I like the solution. Even if it’s only for a couple minutes my blog will look different for that time, and that would be a bit unprefessional…
There has to be someone who which function is called from wp-settings.php!!!
Forum: Fixing WordPress
In reply to: Problems with previewI think it’s a good idea, and I will try it if I can’t find the error, but I really want to see what’s wrong.
So if you know, could you please tell me which file or function is called from wp-settings.php in order to fetch the post from teh database.
I know that somewhere down the road you end up in the WP_Query class or soething like that, but I can’t figure out where to go from wp-settings.php.
And I think php is really hard to debug compared to Java…
Forum: Fixing WordPress
In reply to: Direct Access to this location is not allowed.I’m trying to do that…
I’m having WordPress installed as a plugin in Joomla. I think this is what causes it… The plugin is developed by corePHP…
Forum: Plugins
In reply to: [Plugin: Sociable] Site icons does not appear in Sociable backendI put this in my index.php file:
if (function_exists('sociable_html')) { echo sociable_html($sociable_known_sites); }Now, a list with the sites is displayed, but with no icons.
This variable is empty: $sociablepluginpath
The src in the images are not right.
This is the url to the images which is very wrong:/components/com_wordpress/wp-content/plugins/sociable/This is where I have put the plugin: /public_html/images/wordpress/plugins/sociable
This is recommended by WordPress, so why is it using the old url. In settings I’ve chosen the value “No” for “Use default content path for WordPress”.
I’m using WordPress with Joomla. Could this cause the errors?
Hi!
Thanks for your answer. What do you mean by a standard installation? I’ve uploaded the simple-facebook-connect folder to the plugins folder on the server. Isn’t that the only way to do it?I’m using WordPress with Joomla, maybe that could cause the error.
Can you please tell which url should be called when you click the save button?
I had some trouble with another plugin as well. With the url to some of the images. Maybe there is a problem with one of the variables that stores the base url to the server?