Strange Behaviour With gallery_columns Attribute

Permalink Browser Info Environment
Hi - I am getting some weird behaviour in the gallery when an image that is being used had previously had the gallery_columns file attribute set to a specific value, but then has had the gallery_columns value set back to None. If you take a look at the attached files, you can see that the style "b-col-" is being applied to the image wrapper div, but this should be something like "b-col-4".

The line of code in view.php causing the issue seems to be this one...
$imageColumn = $f->getAttribute('gallery_columns') ? $f->getAttribute('gallery_columns') : $options->galleryColumns;


For some reason, $f->getAttribute('gallery_columns') appears to be set to something, but not sure what.

If I replace the line of code with this one...
$imageColumn = strlen($f->getAttribute('gallery_columns'))>0 ? $f->getAttribute('gallery_columns') : $options->galleryColumns;

the gallery seems to function correctly.

I am no php expert, so I am not sure what the problem is. Maybe you can shed some light on why it's not working as expected?

Thanks

James

2 Attachments

Type: Pre-Sale
Status: New
jheanly
View Replies:

concrete5 Environment Information

# concrete5 Version
Core Version - 5.7.5.9
Version Installed - 5.7.5.9
Database Version - 20160615000000

# concrete5 Packages
Easy Image Gallery (1.3.1).

# concrete5 Overrides
blocks/autonav/templates/kpc_nav/view.php, blocks/autonav/templates/kpc_nav, blocks/autonav/templates, blocks/autonav, blocks/hco_button_link/add.php, blocks/hco_button_link/controller.php, blocks/hco_button_link/css/buttons.css, blocks/hco_button_link/css, blocks/hco_button_link/db.xml, blocks/hco_button_link/edit.php, blocks/hco_button_link/form.php, blocks/hco_button_link/icon.png, blocks/hco_button_link/view.php, blocks/hco_button_link, blocks/hco_zoom_carousel/add.php, blocks/hco_zoom_carousel/composer.php, blocks/hco_zoom_carousel/controller.php, blocks/hco_zoom_carousel/css/grabbing.png, blocks/hco_zoom_carousel/css/owl.carousel.css, blocks/hco_zoom_carousel/css/owl.theme.css, blocks/hco_zoom_carousel/css, blocks/hco_zoom_carousel/db.xml, blocks/hco_zoom_carousel/edit.php, blocks/hco_zoom_carousel/form_setup_html.php, blocks/hco_zoom_carousel/icon.png, blocks/hco_zoom_carousel/js/owl.carousel.min.js, blocks/hco_zoom_carousel/js, blocks/hco_zoom_carousel/LICENSE.TXT, blocks/hco_zoom_carousel/scrapbook.php, blocks/hco_zoom_carousel/view.css, blocks/hco_zoom_carousel/view.php, blocks/hco_zoom_carousel, blocks/hello_world/add.php, blocks/hello_world/controller.php, blocks/hello_world/db.xml, blocks/hello_world/edit.php, blocks/hello_world/form.php, blocks/hello_world/icon.png, blocks/hello_world/view.php, blocks/hello_world, blocks/horizontal_rule/view.php, blocks/horizontal_rule, languages/cs_CZ/LC_MESSAGES/messages.mo, languages/cs_CZ/LC_MESSAGES, languages/cs_CZ, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/en_GB/LC_MESSAGES/messages.mo, languages/en_GB/LC_MESSAGES, languages/en_GB, languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, themes/spirit/config.rb, themes/spirit/css/animate.css, themes/spirit/css/bootstrap.css, themes/spirit/css/bootstrap.min.css, themes/spirit/css/owl.carousel.css, themes/spirit/css/owl.theme.css, themes/spirit/css/presets, themes/spirit/css/style.css, themes/spirit/css, themes/spirit/default.php, themes/spirit/description.txt, themes/spirit/elements/footer.php, themes/spirit/elements/header.php, themes/spirit/elements, themes/spirit/fonts/font-awesome/css/font-awesome.css, themes/spirit/fonts/font-awesome/css/font-awesome.min.css, themes/spirit/fonts/font-awesome/css, themes/spirit/fonts/font-awesome/fonts/fontawesome-webfont.eot, themes/spirit/fonts/font-awesome/fonts/fontawesome-webfont.svg, themes/spirit/fonts/font-awesome/fonts/fontawesome-webfont.ttf, themes/spirit/fonts/font-awesome/fonts/fontawesome-webfont.woff, themes/spirit/fonts/font-awesome/fonts/fontawesome-webfont.woff2, themes/spirit/fonts/font-awesome/fonts/FontAwesome.otf, themes/spirit/fonts/font-awesome/fonts, themes/spirit/fonts/font-awesome/less/animated.less, themes/spirit/fonts/font-awesome/less/bordered-pulled.less, themes/spirit/fonts/font-awesome/less/core.less, themes/spirit/fonts/font-awesome/less/fixed-width.less, themes/spirit/fonts/font-awesome/less/font-awesome.less, themes/spirit/fonts/font-awesome/less/icons.less, themes/spirit/fonts/font-awesome/less/larger.less, themes/spirit/fonts/font-awesome/less/list.less, themes/spirit/fonts/font-awesome/less/mixins.less, themes/spirit/fonts/font-awesome/less/path.less, themes/spirit/fonts/font-awesome/less/rotated-flipped.less, themes/spirit/fonts/font-awesome/less/stacked.less, themes/spirit/fonts/font-awesome/less/variables.less, themes/spirit/fonts/font-awesome/less, themes/spirit/fonts/font-awesome/scss/_animated.scss, themes/spirit/fonts/font-awesome/scss/_bordered-pulled.scss, themes/spirit/fonts/font-awesome/scss/_core.scss, themes/spirit/fonts/font-awesome/scss/_fixed-width.scss, themes/spirit/fonts/font-awesome/scss/_icons.scss, themes/spirit/fonts/font-awesome/scss/_larger.scss, themes/spirit/fonts/font-awesome/scss/_list.scss, themes/spirit/fonts/font-awesome/scss/_mixins.scss, themes/spirit/fonts/font-awesome/scss/_path.scss, themes/spirit/fonts/font-awesome/scss/_rotated-flipped.scss, themes/spirit/fonts/font-awesome/scss/_stacked.scss, themes/spirit/fonts/font-awesome/scss/_variables.scss, themes/spirit/fonts/font-awesome/scss/font-awesome.scss, themes/spirit/fonts/font-awesome/scss, themes/spirit/fonts/font-awesome, themes/spirit/fonts/fonts/glyphicons-halflings-regular.eot, themes/spirit/fonts/fonts/glyphicons-halflings-regular.svg, themes/spirit/fonts/fonts/glyphicons-halflings-regular.ttf, themes/spirit/fonts/fonts/glyphicons-halflings-regular.woff, themes/spirit/fonts/fonts/glyphicons-halflings-regular.woff2, themes/spirit/fonts/fonts, themes/spirit/fonts, themes/spirit/full.php, themes/spirit/home.php, themes/spirit/img/01.jpg, themes/spirit/img/02.png, themes/spirit/img/03.jpg, themes/spirit/img/04.jpg, themes/spirit/img/05.jpg, themes/spirit/img/animal-silhouette-horizon-horse.jpg, themes/spirit/img/client/01.png, themes/spirit/img/client/02.png, themes/spirit/img/client/03.png, themes/spirit/img/client/04.png, themes/spirit/img/client/05.png, themes/spirit/img/client/06.png, themes/spirit/img/client/07.png, themes/spirit/img/client, themes/spirit/img/homepage-header-large.jpg, themes/spirit/img/homepage-header-small.jpg, themes/spirit/img/horse-herd-fog-nature-52500.jpeg, themes/spirit/img/pexels-photo-106683.jpeg, themes/spirit/img/pexels-photo-113803-bw.jpeg, themes/spirit/img/pexels-photo-113803-short.jpeg, themes/spirit/img/pexels-photo-113803.jpeg, themes/spirit/img/pexels-photo-28905.jpg, themes/spirit/img/portfolio/01.jpg, themes/spirit/img/portfolio/02.jpg, themes/spirit/img/portfolio/03.jpg, themes/spirit/img/portfolio/04.jpg, themes/spirit/img/portfolio/05.jpg, themes/spirit/img/portfolio/06.jpg, themes/spirit/img/portfolio/07.jpg, themes/spirit/img/portfolio/08.jpg, themes/spirit/img/portfolio, themes/spirit/img/team/01.jpg, themes/spirit/img/team/02.jpg, themes/spirit/img/team/03.jpg, themes/spirit/img/team/04.jpg, themes/spirit/img/team, themes/spirit/img, themes/spirit/js/main.js, themes/spirit/js/modernizr.custom.js, themes/spirit/js/owl.carousel.js, themes/spirit/js/SmoothScroll.js, themes/spirit/js, themes/spirit/left_sidebar.php, themes/spirit/page_theme.php, themes/spirit/readme.txt, themes/spirit/right_sidebar.php, themes/spirit/sass/presets/_buttons.scss, themes/spirit/sass/presets/_defaults.scss, themes/spirit/sass/presets/_gallery-page-list.scss, themes/spirit/sass/presets/_mobile-first.scss, themes/spirit/sass/presets/_responsive.scss, themes/spirit/sass/presets, themes/spirit/sass/style.scss, themes/spirit/sass, themes/spirit/thumbnail.png, themes/spirit, blocks/autonav/templates/kpc_nav/view.php, blocks/autonav/templates/kpc_nav, blocks/autonav/templates, blocks/autonav, blocks/hco_button_link/add.php, blocks/hco_button_link/controller.php, blocks/hco_button_link/css/buttons.css, blocks/hco_button_link/css, blocks/hco_button_link/db.xml, blocks/hco_button_link/edit.php, blocks/hco_button_link/form.php, blocks/hco_button_link/icon.png, blocks/hco_button_link/view.php, blocks/hco_button_link, blocks/hco_zoom_carousel/add.php, blocks/hco_zoom_carousel/composer.php, blocks/hco_zoom_carousel/controller.php, blocks/hco_zoom_carousel/css/grabbing.png, blocks/hco_zoom_carousel/css/owl.carousel.css, blocks/hco_zoom_carousel/css/owl.theme.css, blocks/hco_zoom_carousel/css, blocks/hco_zoom_carousel/db.xml, blocks/hco_zoom_carousel/edit.php, blocks/hco_zoom_carousel/form_setup_html.php, blocks/hco_zoom_carousel/icon.png, blocks/hco_zoom_carousel/js/owl.carousel.min.js, blocks/hco_zoom_carousel/js, blocks/hco_zoom_carousel/LICENSE.TXT, blocks/hco_zoom_carousel/scrapbook.php, blocks/hco_zoom_carousel/view.css, blocks/hco_zoom_carousel/view.php, blocks/hco_zoom_carousel, blocks/hello_world/add.php, blocks/hello_world/controller.php, blocks/hello_world/db.xml, blocks/hello_world/edit.php, blocks/hello_world/form.php, blocks/hello_world/icon.png, blocks/hello_world/view.php, blocks/hello_world, blocks/horizontal_rule/view.php, blocks/horizontal_rule, languages/cs_CZ/LC_MESSAGES/messages.mo, languages/cs_CZ/LC_MESSAGES, languages/cs_CZ, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/en_GB/LC_MESSAGES/messages.mo, languages/en_GB/LC_MESSAGES, languages/en_GB, languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, themes/spirit/config.rb, themes/spirit/css/animate.css, themes/spirit/css/bootstrap.css, themes/spirit/css/bootstrap.min.css, themes/spirit/css/owl.carousel.css, themes/spirit/css/owl.theme.css, themes/spirit/css/presets, themes/spirit/css/style.css, themes/spirit/css, themes/spirit/default.php, themes/spirit/description.txt, themes/spirit/elements/footer.php, themes/spirit/elements/header.php, themes/spirit/elements, themes/spirit/fonts/font-awesome/css/font-awesome.css, themes/spirit/fonts/font-awesome/css/font-awesome.min.css, themes/spirit/fonts/font-awesome/css, themes/spirit/fonts/font-awesome/fonts/fontawesome-webfont.eot, themes/spirit/fonts/font-awesome/fonts/fontawesome-webfont.svg, themes/spirit/fonts/font-awesome/fonts/fontawesome-webfont.ttf, themes/spirit/fonts/font-awesome/fonts/fontawesome-webfont.woff, themes/spirit/fonts/font-awesome/fonts/fontawesome-webfont.woff2, themes/spirit/fonts/font-awesome/fonts/FontAwesome.otf, themes/spirit/fonts/font-awesome/fonts, themes/spirit/fonts/font-awesome/less/animated.less, themes/spirit/fonts/font-awesome/less/bordered-pulled.less, themes/spirit/fonts/font-awesome/less/core.less, themes/spirit/fonts/font-awesome/less/fixed-width.less, themes/spirit/fonts/font-awesome/less/font-awesome.less, themes/spirit/fonts/font-awesome/less/icons.less, themes/spirit/fonts/font-awesome/less/larger.less, themes/spirit/fonts/font-awesome/less/list.less, themes/spirit/fonts/font-awesome/less/mixins.less, themes/spirit/fonts/font-awesome/less/path.less, themes/spirit/fonts/font-awesome/less/rotated-flipped.less, themes/spirit/fonts/font-awesome/less/stacked.less, themes/spirit/fonts/font-awesome/less/variables.less, themes/spirit/fonts/font-awesome/less, themes/spirit/fonts/font-awesome/scss/_animated.scss, themes/spirit/fonts/font-awesome/scss/_bordered-pulled.scss, themes/spirit/fonts/font-awesome/scss/_core.scss, themes/spirit/fonts/font-awesome/scss/_fixed-width.scss, themes/spirit/fonts/font-awesome/scss/_icons.scss, themes/spirit/fonts/font-awesome/scss/_larger.scss, themes/spirit/fonts/font-awesome/scss/_list.scss, themes/spirit/fonts/font-awesome/scss/_mixins.scss, themes/spirit/fonts/font-awesome/scss/_path.scss, themes/spirit/fonts/font-awesome/scss/_rotated-flipped.scss, themes/spirit/fonts/font-awesome/scss/_stacked.scss, themes/spirit/fonts/font-awesome/scss/_variables.scss, themes/spirit/fonts/font-awesome/scss/font-awesome.scss, themes/spirit/fonts/font-awesome/scss, themes/spirit/fonts/font-awesome, themes/spirit/fonts/fonts/glyphicons-halflings-regular.eot, themes/spirit/fonts/fonts/glyphicons-halflings-regular.svg, themes/spirit/fonts/fonts/glyphicons-halflings-regular.ttf, themes/spirit/fonts/fonts/glyphicons-halflings-regular.woff, themes/spirit/fonts/fonts/glyphicons-halflings-regular.woff2, themes/spirit/fonts/fonts, themes/spirit/fonts, themes/spirit/full.php, themes/spirit/home.php, themes/spirit/img/01.jpg, themes/spirit/img/02.png, themes/spirit/img/03.jpg, themes/spirit/img/04.jpg, themes/spirit/img/05.jpg, themes/spirit/img/animal-silhouette-horizon-horse.jpg, themes/spirit/img/client/01.png, themes/spirit/img/client/02.png, themes/spirit/img/client/03.png, themes/spirit/img/client/04.png, themes/spirit/img/client/05.png, themes/spirit/img/client/06.png, themes/spirit/img/client/07.png, themes/spirit/img/client, themes/spirit/img/homepage-header-large.jpg, themes/spirit/img/homepage-header-small.jpg, themes/spirit/img/horse-herd-fog-nature-52500.jpeg, themes/spirit/img/pexels-photo-106683.jpeg, themes/spirit/img/pexels-photo-113803-bw.jpeg, themes/spirit/img/pexels-photo-113803-short.jpeg, themes/spirit/img/pexels-photo-113803.jpeg, themes/spirit/img/pexels-photo-28905.jpg, themes/spirit/img/portfolio/01.jpg, themes/spirit/img/portfolio/02.jpg, themes/spirit/img/portfolio/03.jpg, themes/spirit/img/portfolio/04.jpg, themes/spirit/img/portfolio/05.jpg, themes/spirit/img/portfolio/06.jpg, themes/spirit/img/portfolio/07.jpg, themes/spirit/img/portfolio/08.jpg, themes/spirit/img/portfolio, themes/spirit/img/team/01.jpg, themes/spirit/img/team/02.jpg, themes/spirit/img/team/03.jpg, themes/spirit/img/team/04.jpg, themes/spirit/img/team, themes/spirit/img, themes/spirit/js/main.js, themes/spirit/js/modernizr.custom.js, themes/spirit/js/owl.carousel.js, themes/spirit/js/SmoothScroll.js, themes/spirit/js, themes/spirit/left_sidebar.php, themes/spirit/page_theme.php, themes/spirit/readme.txt, themes/spirit/right_sidebar.php, themes/spirit/sass/presets/_buttons.scss, themes/spirit/sass/presets/_defaults.scss, themes/spirit/sass/presets/_gallery-page-list.scss, themes/spirit/sass/presets/_mobile-first.scss, themes/spirit/sass/presets/_responsive.scss, themes/spirit/sass/presets, themes/spirit/sass/style.scss, themes/spirit/sass, themes/spirit/thumbnail.png, themes/spirit

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.2.29 (Unix) mod_wsgi/3.5 Python/2.7.10 PHP/5.6.10 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.22.0

# Server API
apache2handler

# PHP Version
5.6.10

# PHP Extensions
apache2handler, bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mcrypt, mysql, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, yaz, 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 - 32M
sql.safe_mode - Off
upload_max_filesize - 32M
ldap.max_links - Unlimited
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 1440
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 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.