Problems getting F5 Grid 4 to work

Permalink Browser Info Environment
Hi

I got your theme because of the nice looking blog Grid view F5 Grid 4, but have not been able to get it to work on my site. I have been trying to get a page list to use the Custom template, but receive the following error:

Warning: Invalid argument supplied for foreach() in /home/icinorgu/public_html/beta/packages/foundation_5/blocks/page_list/templates/f5_grid_4/view.php on line 10

Thank you very much.

Type: Discussion
Status: In Progress
icinorguk
View Replies:
formigo replied on at Permalink Reply
formigo
Would you be able to private message us a URL and log in to your site so we can take a look please. Not an issue we have seen before.

Thanks
formigo replied on at Permalink Reply
formigo
Thanks for sending over the log in details - we have just been taking a look.

I tried recreating some pages and adding the page list block with the 'grid' template but no luck. I then retested on our site and everything works as expected.

The only thing that stands out to me is you are running a later version of concrete5 than our demo site although I would not have thought this would have been an issue we are going to investigate. We will let you know what we find.

Thanks
icinorguk replied on at Permalink Reply
icinorguk
Thank you. The extent of my debugging abilities is that the array $pages is empty. I inserted a line above the foreach loop to print the contents of the array and it is blank. Not sure where $pages is populated, so I couldn't trace back up.
formigo replied on at Permalink Reply
formigo
I have just installed on a 5.6.3.2 site to see if the issue is the same - it works for me again...

I have a feeling this issue is local to your install I am just not sure why yet?

Did you install your site with 'sample content' or 'blank' - can you remember? Just wondering whether something does not exist in your install which does in ours...
icinorguk replied on at Permalink Reply
icinorguk
I installed this as a version 5.4 about 2.5 years ago. I think I installed with sample content at the time. I have been updating to each version ever since. I would love to do a fresh install of Concrete5, but I would lose all of the content -unless you know of a way to do it, in which case I would be very grateful if you can point me in the right direction.

Regarding my post above, do you know where the array $pages gets populated - maybe we can try to do some more debugging around that module?

I appreciate your help in this matter - it has been very frustrating trying to get this to work and I am getting pressure now from the users!
formigo replied on at Permalink Reply
formigo
It is very difficult for us to diagnose and come up with a solution when we can not replicate i am sure you can appreciate.

The 'pages' array is the exact same on used in the default views of the page-list block which I would imagine is populated from within the block controller.

It may be worth, if you can, commenting out some code in the 'grid' view and working backwards to see what code your install does not like. For example if in the foreach loop you only populate say 'title' as a starting point then you can add each other element one by one testing as you go.
icinorguk replied on at Permalink Reply
icinorguk
Got it working! I replaced $pages with $cArray in the foreach loop and everything looks fine now. Will need further testing to make sure I haven't broken something else.

concrete5 Environment Information

# concrete5 Version
5.6.3.2

# concrete5 Packages
Advanced Forms (1.13.1), Black Accents (2.0), Foundation 5 (1.6.0), Innovation (2.1), Mail Monkey (2.1.2), Paypal Cart System Pro (1.1), Paypal Donations Box (1.0.1), Pygmalion Konsus (1.0.4), RonyD Icons (0.9.2), Sample Content and Install Generator (0.9), Tweetcrete (1.7).

# concrete5 Overrides
blocks/page_list, themes/default

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.4.35

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, enchant, ereg, exif, filter, ftp, gd, gettext, hash, iconv, imagick, imap, ionCube Loader, json, libxml, mbstring, mcrypt, mysql, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, Reflection, session, SimpleXML, soap, sockets, SourceGuardian, SPL, sqlite3, standard, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, zip, zlib.

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 128M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.