Problem Solving

Solving problems with Omni Gallery.

Using theme CSS

Omni Gallery provides many options for generating gallery styles. These are normally generated for each specific gallery block and injected into the page header as <style> elements.

If you would rather build such styling into a custom theme, output of Omni Gallery generated styles can be suppressed by selecting Suppress style output in the Advanced tab of the edit dialog.

A useful trick may be to initially use Omni Gallery to generate the styles, capture them from the page, then copy and edit the stles into your theme, removing block instance specific selectors.

Suppress style output is an all or nothing setting. Once selected, you will need to provide all styling through your theme css.

Can I have a different Description in the Lightbox?

With v1.2.0, Omni Gallery supports two description groups in Image Selectors.

  1. Description
  2. Extended Description

Each of these descriptions can be configured independently in the Image Selector and then selected independently in the Display Widget and Lightbox. For example, use Description in the Display Widget and Extended Description in the Lightbox. Or use Description in the Display Widget and both Description and Extended Description in the Lightbox.

Lightbox is not showing

Showing a lightbox overlay requires 2 complimentary settings

  1. A Lighbox Overlay is selected. ie., Magnific, not None.
  2. Images in the gallery link to an image. In most cases this is a matter of setting Link to in Image Selection and selecting Image URL, though other image properties or attributes may also be used to create a link to an image.

Gallery takes a long time to load

The usual loading problems for any gallery block are caused by inappropriate selection of image sizes and the elements used to display images. In general, make sure images uploaded are big enough for your purposes and no bigger.

Within Omni Gallery, there are some further settings you can take advantage of to optimise the galleries and sliders generated.

In Image Display and Lighbox, select an appropriate image element. For example, a picture element with source set and optimal selection of thumbnail types will usually be better for a site that has mixed mobile and desktop view.

If you anticipate the Lightbox being used a lot, it can sometimes be better to select image elements and sizes appropriate to Lightbox within Image Display, so reducing diversification of files loaded.

In the Advanced settings, experiment with Lazy Loading settings.

In Image Selection, slow loading could be the consequence of prefetching large lists of images. Using an Infinite Dynamic variant of an Image Source will limit the images prefetched to those needed for the current Pagination in Image Display.


Gallery doesn't show or shows empty

If a gallery or slider does not show or is showing but empty, the most likely reason is that there are no images in it!

That situation is easy to detect when listing a fileset or folder, but a little more complex when creating a gallery from page or user lists. With a page or user list, Omni Gallery lists images for the pages or users from their attributes. Attributes for Associated Images are selected in the edit dialog based on their association with the page or user object - not on their actually pointing to image files. Hence it is entirely possible to have a page or user with no associated images, and that page or user is then omitted from the gallery.

If that situation applies to all pages or users listed, the gallery will be empty.

Page or User listed multiple times or missing from a gallery

This is related to the above consideration for galleries built from images associated with pages or users.

The point to always remember is that Omni Gallery works with images. Anything else as a source is merely an indirect means of listing images. Hence a gallery built from a page list where a page provides 3 images will list 3 images, and while the image attributes will be different, the page attributes associated with each of those 3 images will be identical.

Related to this, Omni Gallery only shows an image once. Continuing with our page list scenario, if 3 pages have the same thumbnail image and that is the only image for those pages, only one copy of the image will be shown in the gallery with only one of the pages. The other 2 pages will be superfluous.

JavaScript Interference

If a gallery does not work, it could be that something is interfering with the gallery display widget's JavaScript. Galleries attach themselves to DOM elements. A typical problem scenario is that after a gallery has attached itself, something else manipulates the DOM and breaks that attachment. 

The solution is to manipulate the order in which the scripts initialise, so that the gallery display widget initialises after the interfering JavaScript has finished messing with the DOM, or to forcibly re-initialise the gallery display widget after the DOM messing has completed. This is a bit too complicated to provide a generic solution. If you need help, please contact me for support and we can discuss your problem and possible solutions.

Another scenario is an over-enthusiastic smooth scroll script hijacking controls in the gallery display widget. Here the solution is easier, just make the smooth scroll less greedy about what it selects.

The opposite is also possible. In particular, the Vegas display widget manipulates the DOM about the element it is attaching a background to. This can break the attachment of other JavaScripts to elements within that DOM element. Unfortunately the vegas.js is not as well behaved as we would have liked, so it can be neccessary to delay the initialisation of the other JavaScript until after Vegas has finished messing about! 

Setting "Replace with marker in edit mode" to "Off" makes no difference

In the Advanced tab of the edit dialog, Replace with marker in edit mode will normally decide whether the Omni Gallery block shows as an edit mode placeholder or a static view of the gallery or slider.

However, some display widgets are unable to partially render in edit mode. Those widgets will always replace with a marker and ignore this setting.

For example, trying to display a Vegas background in edit mode would interfere with the concrete5 editing process. Similarly, the Swiper JavaScript is just too complex to run in edit mode.

Omin Gallery or Universal Content Puller?

There is some overlap between the capabilities of Omni Gallery and Universal Content Puller. Both can create lists of things and display them.

  • Omni Gallery creates lists of images and displays them in ways optimised for images.
  • Universal Content Puller can create lists from pretty much anything, but the displays are optimised for lists and tables. These lists and tables may contain images, but they are not galleries or sliders.

The Elements selector in Omni Gallery Elements shows too many elements

Omni Gallery Elements searches for elements in all packages and in /application/elements. It then filters out some packages and elements and highlights elements declared as compatible because they are in an /omni_gallery_elements/ subdirectory.

You can set some configuration lists in /application/config to customize what gets filtered on your site, see Fine Tuning the Element Selector.

Whoops on install

What we mean here is an internal code exception in an addon or the core when you click the install button from the Add Functionality dashboard page or when you visit a page after installing an addon package. 

If you experience such an issue, here are a few things you can check that may resolve the problem.

  1. Php Version. Check your php version is compatible with the addon, For example, check if you are running php5.6 when an addon requires php7+. You can find the php version in the report at /dashboard/system/environment/info. As a general guide, if your site is concrete5 version 8+ then aim to run on at least php7.2. (It will run on lower versions, but less efficiently)
  2. Database Entities. concrete5 uses a database abstraction layer called Doctrine. Doctrine works by creating proxy classes that map between php data and the database and sometimes these get out of step or muddled into a chicken and egg dilemma. The dashboard page at /dashboard/system/environment/entities has a switch to control when the proxy classes are regenerated. Try placing this into Development mode when installing an addon package (but remember to disable development mode to speed up a live site)
  3. Cache. concrete5 makes extensive use of a number of different caching mechanisms to speed up web pages. When installing a package, sometimes outdated cached data causes issues with the install. Try disabling all the caches at /dashboard/system/optimization/cache when installing an addon package (but remember to re-enable the caches for a live site).
  4. Theme. Most marketplace themes are well behaved. Nevertheless, sometimes a theme can interfere with an addon package, so try switching the site theme back to Elemental using /dashboard/pages/themes. You won't loose any content on the front of your site, but some page areas may not be shown until you swap back to your theme.
  5. Middleware. Some addons implement middleware layers that manipulate pages before and/or after the main concrete5 rendering of each page. If such addons are installed, there is a possibly they could interfere with the dashboard and other addon installation. Most such middleware implementations include condition checks to ensure they don't mess with the dashboard, but perhaps you can switch them temporarily off just to be sure.

If you experience a code error on or immediately after install and need assistance, please use the Get Help link from the addon marketplace page to report the problem. On the Whoops report, click the [copy] button immediately below the error message. That will provide a stack trace you can paste into the help request and save time having to request that report later.