You are here:  » Feeds Not Registering


Feeds Not Registering

Submitted by Stew on Wed, 2014-04-23 22:11 in

Hi David,

Hope all is well, am having an issue it seems registering new feeds on a new project.

I originally started the project around 6 months ago & I think at the time I copied the PT install from my other site. All looks fine in the admin etc, except when I register a feed, I select all the dropdowns as appropriate - but when registering & full import - I'm taken back to the feed management page - without the feed being registered.

Any ideas here?

Submitted by support on Thu, 2014-04-24 08:57

Hi Stew,

The most likely reason here is that custom fields were added to the installation from which you have copied the files, but the corresponding database changes have not yet been applied to the new installation, so the feed registration queries are failing.

To check, enable database debug mode by changing line 6 in config.advanced.php as follows;

  $config_databaseDebugMode = TRUE;

...and then try registering a feed again. Check for an error such as "unknown column ..." which would indicate that this is the case. If so, you would ordinarily need to run the dbmod.php scripts based on the example code in this thread however the following script is a "universal" version that will go through $config_fieldSet and make the appropriate database changes for all custom fields:

<?php
  
require("includes/common.php");
  
$config_databaseDebugMode FALSE;
  
$ignore = array("name","description","image_url","buy_url","price","category","brand");
  foreach(
$config_fieldSet as $field => $v)
  {
    if (
in_array($field,$ignore)) continue;
    
$sql "ALTER TABLE `".$config_databaseTablePrefix."feeds`
              ADD `field_"
.$field."` VARCHAR(255) NOT NULL";
    
database_queryModify($sql,$result);
    
$sql "ALTER TABLE `".$config_databaseTablePrefix."products`
              ADD `"
.$field."` VARCHAR(255) NOT NULL";
    
database_queryModify($sql,$result);
  }
  print 
"Done.";
?>

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Stew on Sat, 2014-04-26 13:49

Hi David,

That's brilliant - many thanks - looks to have worked 1st time,

Thanks

Submitted by bat on Fri, 2017-03-31 13:57

Hi David,
I've just copied on of my other installations to a domain and have the same issue. Can't register the feeds. I select all the necessary dropdowns but when I click register/register and trial import/full import, it just sends me back to the admin page where the feed isn't registered.
I've ran the mod which you put above as I'd copied over the delivery field too and that seems to have worked fine (showing in the database) but still no luck registering the feeds.

Submitted by support on Fri, 2017-03-31 14:22

Hello bat,

Make sure the above script was run from top level and that would normally resolve any registration issues following a site move however if registration is still failing the thing to do would be to enable database debug mode by changing line 6 in config.advanced.php as follows;

  $config_databaseDebugMode = TRUE;

But also, since database errors at registration time may not be captured due to the page refresh back to the /admin/ home page, edit includes/database.php and look for the following code at line 56:

      print "[".$sql."][".mysqli_error($link)."]";

...and REPLACE with:

      print "[".$sql."][".mysqli_error($link)."]";exit();

Then try to register a feed again and if a database error occurs the script will abort and the error can be captured. If you are not sure from what is displayed where the problem lies (or if there is no difference of course), let me know what is displayed and I'll check it out further with you...

Cheers,
David.
--
PriceTapestry.com