localhost development – import problems

Hey,

Great to find this plugin it “looks” like just the ticket – but I’m having some small problems getting going.

I’ve hooked in two WP blogs I build – both use standard feeds – and added the image add-on, as I need images for each post.

So far, it has imported categories, but no posts from one blog. – posts and categories from another – but no images at all…

I deleted all posts, tweaked the settings and now it’s only importing categories – no posts.. is there a cache option or some way to debug what is happening?

Also, will this plugin work normally on a localhost ( standard xampp – working well )?

Thanks in advance

Ray!

  • Ray Q
    • Site Builder, Child of Zeus

    Hi,

    Just as a follow-up, there are also a number of bugs in the plugin – if you turn on WP_DEBUG and edit a feed you’ll see them – mostly there’re quick ones to fix with additional ternary operators, for example:

    line 927:

    $startfrom = $table;

    becomes:

    $startfrom = ( isset($table) ? $table : ” );

    as the variable is not set – but is being treated as if it were…

    There are a few others like this – nothing major.. but annoying to see when developing with WP_DEBUG set to true.

    Thanks!

  • Ray Q
    • Site Builder, Child of Zeus

    There is also a DB error on the main autoblog page:

    WordPress database error: [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 ‘WHERE site_id = 0 AND meta_key LIKE ‘autoblog_log_%’ ORDER BY meta_id DESC LIMIT’ at line 1]

    SELECT * FROM WHERE site_id = 0 AND meta_key LIKE ‘autoblog_log_%’ ORDER BY meta_id DESC LIMIT 0, 25

    I’d be happy to help out a little to fix things up – but I’m also a bit pressed to get a job finished ( ideally using this plugin.. ) – let me know!

    Cheers

  • Ray Q
    • Site Builder, Child of Zeus

    ok – so.. some progress.

    Cleared the post trash – and it’s importing correctly from one blog ( posts, categories, inline images ).. only categories from the second blog – I’ll review the feed.

    I see that the add-on class for importing images is nicely done ( regex to scrape images and then plugging them into the WP library ).. how does the plugins determine which element ( selector or DOM ) to scan for the original content to import?

    Cheers!

    Ray

  • Ray Q
    • Site Builder, Child of Zeus

    sorry to bombard – another issue – I hope this is the right way to report things?

    I’ve set-up the import option on each feed to import using the original author and to fall-back to a new user I added – however all the posts are being attributed to me, as the logged in user.

  • Ray Q
    • Site Builder, Child of Zeus

    the given title is really misleading now – this plugin works, but has problems – some of which need to be solved by the developer with WP_DEBUG = true turned on ( which I’m kind of surprised it was not during it’s development )… as to why one of my feeds will not import – I’ve not got an answer yet.. the plugin testing routine does not find a problem.. so I would need to unpick the import class.. but that’s beyond what I can take on at the moment – any help would be appreciated!

    Thanks

  • Ray Q
    • Site Builder, Child of Zeus

    Hi Brian – thanks for the heads-up.

    I’ve got to get something working delivered next week – for me the plugin is doing enough at present – but it would be ideal to iron out the small bugs and even better to find out what stops it working on the feed I mention ( a few times… ) above :slight_smile:

    Thanks – if I can help out, just let me know.

    Ray

  • Barry
    • DEV MAN’s Mascot

    the given title is really misleading now – this plugin works, but has problems – some of which need to be solved by the developer with WP_DEBUG = true turned on ( which I’m kind of surprised it was not during it’s development )… as to why one of my feeds will not import – I’ve not got an answer yet.. the plugin testing routine does not find a problem.. so I would need to unpick the import class.. but that’s beyond what I can take on at the moment – any help would be appreciated!

    Can you give me a status update then? So I know what issues you now have?

    Have you validated your feed to make sure it doesn’t report any errors?

  • Barry
    • DEV MAN’s Mascot

    some of which need to be solved by the developer with WP_DEBUG = true turned on ( which I’m kind of surprised it was not during it’s development )

    It is and it *always* is – I’m currently running the latest version for testing with the RC of WP3.5 (as 3.5 is due out v.v. soon) and getting no warnings or errors at all so we need to track down the ones on your install.

    That SQL error is really worrying because that suggests something more serious is up with your install, as the name of a standard WP table is missing from that statement.

  • Ray Q
    • Site Builder, Child of Zeus

    Hi Barry

    the feed validates: http://validator.w3.org/appc/check.cgi?url=http%3A%2F%2Femanuelkuntzelman.com%2Ffeed%2Frss%2F

    Problems I see are as follows:

    – when I import posts they are not assigned to the user I select correctly.

    – the “test feed” option does not discover the problem with the bad feed – so I presume as it validates it’s in the import class – but I’m sorry I’ve not had time to dig into this yet.

    – there are also lots of little unset warnings when developing with WP_DEBUG set to true.

    The plugin works well in most cases – it’s flexible and integrates nicely – I would love if the “import image” add-on would also randomly assign a featured image – that would save me having to run an additional check to pull in an attached image to display.

    Thanks in advance

    Ray

  • Barry
    • DEV MAN’s Mascot

    the “test feed” option does not discover the problem with the bad feed – so I presume as it validates it’s in the import class – but I’m sorry I’ve not had time to dig into this yet.

    The test feed doesn’t do any validation it merely passes the feed through the simplepie class and reports on what it would import if it were to do so.

    there are also lots of little unset warnings when developing with WP_DEBUG set to true.

    Again, I’m not seeing any – so if you could give some details that would be great.

  • Ray Q
    • Site Builder, Child of Zeus

    Hi Barry,

    I’m running on a localhost still – but have a development version online which I’ll check later on – I see the following warnings:

    on the main autoblog page:

    WordPress database error: [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 ‘WHERE site_id = 0 AND meta_key LIKE ‘autoblog_log_%’ ORDER BY meta_id DESC LIMIT’ at line 1]

    SELECT * FROM WHERE site_id = 0 AND meta_key LIKE ‘autoblog_log_%’ ORDER BY meta_id DESC LIMIT 0, 25

    When editing an existing feed:

    Notice: Undefined variable: page in C:xampphtdocsgh-infowordpresswp-contentpluginsautoblogautoblogincludesclassesautoblogadmin.php on line 1632

    Notice: Undefined index: endon in C:xampphtdocsgh-infowordpresswp-contentpluginsautoblogautoblogincludesclassesautoblogadmin.php on line 968

    several in the “If author in feed does not exist locally use” select dropdown..

  • Ray Q
    • Site Builder, Child of Zeus

    Hi Barry,

    I’m working on a number of sites at the moment – so my error log is a bit of a mix – but here are some “highlights”:

    [Fri Dec 07 02:12:23 2012] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function wp_create_category() in C:\xampp\htdocs\gh-info\wordpress\wp-content\plugins\autoblog\autoblogincludes\classes\autoblogprocess.php on line 788

    [Fri Dec 07 14:11:03 2012] [error] [client 127.0.0.1] PHP Notice: Undefined variable: page in C:\xampp\htdocs\gh-info\wordpress\wp-content\plugins\autoblog\autoblogincludes\classes\autoblogadmin.php on line 1632, referer: http://localhost/gh-info/wordpress/wp-admin/admin.php?page=autoblog_admin

    [Fri Dec 07 14:11:03 2012] [error] [client 127.0.0.1] PHP Notice: Undefined property: stdClass::$user_id in C:\xampp\htdocs\gh-info\wordpress\wp-content\plugins\autoblog\autoblogincludes\classes\autoblogadmin.php on line 722, referer: http://localhost/gh-info/wordpress/wp-admin/admin.php?page=autoblog_admin

    [Fri Dec 07 14:11:03 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: endon in C:\xampp\htdocs\gh-info\wordpress\wp-content\plugins\autoblog\autoblogincludes\classes\autoblogadmin.php on line 968, referer: http://localhost/gh-info/wordpress/wp-admin/admin.php?page=autoblog_admin

    [Fri Dec 07 14:11:05 2012] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.

    [Fri Dec 07 14:11:05 2012] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.

  • Ray Q
    • Site Builder, Child of Zeus

    I check to assign imported feed categories as categories – not tags – and I did have it set to add missing categories – I later turned that off as the category list swelled and most had no or few posts in them..

    I also added a shared tag to all imported posts.

  • Ray Q
    • Site Builder, Child of Zeus

    Hi Barry,

    I’ve just had a chance to try out the plugin on the live site – default 2012 theme – I upgraded to the latest version.

    I have one existing feed in there – I cannot edit or delete feeds – it gets as far as the author selection process and dies with this error:

    Fatal error: Call to undefined method stdClass::get() in /home/gh_info/greenheart.info/wp-content/plugins/autoblog/autoblogincludes/classes/autoblogadmin.php on line 731

    I only have the WPMU DEV Dashboard plugin installed apart from autoblog.. ( I tried to disable that also – made no difference ).

    Any help would be greatly received as now the plugin does not even allow me to do what it did on the localhost – I need to demo this to a client on Monday morning.

    Thanks!

    Ray

  • Barry
    • DEV MAN’s Mascot

    Fatal error: Call to undefined method stdClass::get() in /home/gh_info/greenheart.info/wp-content/plugins/autoblog/autoblogincludes/classes/autoblogadmin.php on line 731

    Hmmm, that’s a standard WP method on the User class again – your install doesn’t seem to like standard functionality at all :disappointed:

  • Ray Q
    • Site Builder, Child of Zeus

    this is now the online install – nothing to do with the locahost I do dev on ( I did not upload WP from my machine ) – the only thing connecting them is the theme I’ve developed – but this is inactive, as are all the plugins apart from autoblog – what can I do?

  • Ray Q
    • Site Builder, Child of Zeus

    I’ve deleted:

    – all added themes apart from 2011

    – all plugins except autoblog

    – all posts

    – all pages

    – all comments

    – all menus

    deleted and reinstalled the pluging

    cleared all trash / switched to default theme..

    and now.. it is loading..

    I’m going to try and see if I can get further.. I’ll let you know – thanks for your quick replies

    Ray!

  • Ray Q
    • Site Builder, Child of Zeus

    Thanks Barry – I’m stuck on the old version for now – WP will not update to the latest.

    I mentioned before about the posts not being correctly assigned to the user I select – basically I select the user and save – when I return to edit the feed the user is not selected – this post data does not seem to be being saved correctly – perhaps due to the unset problem that are visible with WP_DEBUG set to true?

    Cheers

  • Barry
    • DEV MAN’s Mascot

    I mentioned before about the posts not being correctly assigned to the user I select – basically I select the user and save – when I return to edit the feed the user is not selected – this post data does not seem to be being saved correctly – perhaps due to the unset problem that are visible with WP_DEBUG set to true?

    No, it was a bug the latest version fixed.

    I’m stuck on the old version for now – WP will not update to the latest.

    Might be worth doing a manual download and FTP it up to the server to make sure all the files are overridden to the latest version.

  • Ray Q
    • Site Builder, Child of Zeus

    I just processed a feed ( finally!! ) 5 posts were added to the correct category assigned, however two posts were attributed to me ( the logged in user ) the other 3 were added without a user – I’ll check the DB to see if there is a value in the table..

  • Ray Q
    • Site Builder, Child of Zeus

    thanks Barry – the original feed that would not process before – has just gone though ok ( minus the correct author, as I’m still on the old plugin version )… real progress!

    Thanks for your help so far – I’m sorry to lay this on you but I am under the impression that this is how WPMU works – I’m new, so please be sure to tell when when I ask too much.

    Have a good night

    Ray

  • Ray Q
    • Site Builder, Child of Zeus

    Hi Barry,

    I’ve got the latest and greatest on localhost and dev site – both seem to be behaving normally – no errors on either the main autoblog page nor adding / editing a feed.

    All feeds are importing correctly and posts are being assigned to users correctly.

    My only request – if I could make one after asking so much already – is to consider as an addition for the future an option that will randomly assign a featured image to each post when the image add-on is active.

    Thanks for fixing up the issues – have a great weekend

    Ray

  • Barry
    • DEV MAN’s Mascot

    My only request – if I could make one after asking so much already – is to consider as an addition for the future an option that will randomly assign a featured image to each post when the image add-on is active

    Have you tried the Featured image import add-on which was added in the last update? It grabs the first image in a post and sets that as the featured one.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.