ukbaz Posted March 20, 2019 Share Posted March 20, 2019 Prestashop 1.6 is now supposed to be PHP 7.1 compatible - however... There is a bug with RSS Feed block module (blockrss) when using Prestashop 1.6.1.23 and PHP 7.1.27 The Feed titles, text description and images display fine when served using PHP 7.0, but fail to display with PHP 7.1 Can someone help with a fix for this. I have reverted shop to PHP 7.0 but really want to switch up to 7.1 asap Have attached both php & tpl files that work with PHP 7.0 Many thanks Baz blockrss.tpl blockrss.php Link to comment Share on other sites More sharing options...
Janett Posted March 21, 2019 Share Posted March 21, 2019 (edited) Try with this (See below) Edited March 21, 2019 by Janett Remove file (see edit history) Link to comment Share on other sites More sharing options...
ukbaz Posted March 21, 2019 Author Share Posted March 21, 2019 Hi Jannett Thanks a lot for the reply and the file. Just tried it and the block doesn't show at all on home page. Do I need to reset the module or anything else? Thanks Baz Link to comment Share on other sites More sharing options...
Janett Posted March 21, 2019 Share Posted March 21, 2019 What is the url of the feed configured in the module configuration ? Link to comment Share on other sites More sharing options...
ukbaz Posted March 21, 2019 Author Share Posted March 21, 2019 Hi Janett URL is: https://thermapenblog.com/feed/ Link to comment Share on other sites More sharing options...
Janett Posted March 21, 2019 Share Posted March 21, 2019 (edited) Try with this (See below) Edited March 22, 2019 by Janett Remove file (see edit history) Link to comment Share on other sites More sharing options...
ukbaz Posted March 22, 2019 Author Share Posted March 22, 2019 Hi Janett Tried the new file, thanks - but still no images. The smarty cache is not getting written to with the image url, it's just giving <img class="img-fluid" src=""> See attached smarty cache that's generated - under PHP 7.0 it generates correctly d9f2de91ea49b22f61a5a3328e69cfc328043bf9.blockrss.tpl.php Link to comment Share on other sites More sharing options...
Janett Posted March 22, 2019 Share Posted March 22, 2019 (edited) Try with this (See below) Edited March 22, 2019 by Janett Remove file (see edit history) Link to comment Share on other sites More sharing options...
ukbaz Posted March 22, 2019 Author Share Posted March 22, 2019 Hi Janett - gives me this - even after uninstall & re-install: Fatal error: Uncaught Error: Class 'XML_Feed_Parser' not found in /var/www/vhosts/thermapen.co.uk/httpdocs/test18/modules/blockrss/blockrss.php:156 Stack trace: #0 /var/www/vhosts/thermapen.co.uk/httpdocs/test18/modules/blockrss/blockrss.php(217): Blockrss->hookLeftColumn(Array) #1 /var/www/vhosts/thermapen.co.uk/httpdocs/test18/classes/Hook.php(591): Blockrss->hookHome(Array) #2 /var/www/vhosts/thermapen.co.uk/httpdocs/test18/classes/Hook.php(548): HookCore::coreCallHook(Object(Blockrss), 'hookhome', Array) #3 /var/www/vhosts/thermapen.co.uk/httpdocs/test18/controllers/front/IndexController.php(40): HookCore::exec('displayHome') #4 /var/www/vhosts/thermapen.co.uk/httpdocs/test18/classes/controller/Controller.php(189): IndexControllerCore->initContent() #5 /var/www/vhosts/thermapen.co.uk/httpdocs/test18/classes/Dispatcher.php(367): ControllerCore->run() #6 /var/www/vhosts/thermapen.co.uk/httpdocs/test18/index.php(28): DispatcherCore->dispatch() #7 {main} thrown in /var/www/vhosts/thermapen.co.uk/httpdocs/test18/modules/blockrss/blockrss.php on line 156 Link to comment Share on other sites More sharing options...
Janett Posted March 22, 2019 Share Posted March 22, 2019 Try with this blockrss.php Link to comment Share on other sites More sharing options...
ukbaz Posted March 22, 2019 Author Share Posted March 22, 2019 Great Janett! Working Thank you so much for all your help! Baz Link to comment Share on other sites More sharing options...
ukbaz Posted April 5, 2019 Author Share Posted April 5, 2019 Hi Janett the last fix you gave me worked great with blokrss and Prestashop 1.6, but - looks like the blockrss files have been replaced with ps_rssfeed in Prestashop 1.7. There seems to be no inclusion of images under SimpleXMLElement in this new version. I'm testing a 1.7 install and wondering if you have any ideas how I can include image in feed under Prestashop 1.7? Thanks again Baz ps_rssfeed.zip Link to comment Share on other sites More sharing options...
Janett Posted April 5, 2019 Share Posted April 5, 2019 The module blockrss cannot work on 1.7 because Pear XML_Parser is not available anymore on this version. Probably the reason why ps_rssfeed use SimpleXMLElement. Link to comment Share on other sites More sharing options...
ukbaz Posted April 5, 2019 Author Share Posted April 5, 2019 Hi Jannet - thanks for the quick reply! I know blockrss doesn't work but there seems to be no image inclusion in ps_rssfeed code. Is there a simple way to include feed images using SimpleXMLElement? Baz Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now