Skip Navigation

[Resolved] No published Layouts in admin/toolset/layouts screen

This thread is resolved. Here is a description of the problem and solution.

Problem:
Existing Layouts have all disappeared from the Toolset > Layouts page, which now includes a JS error in the browser console.

Solution:
There were major changes to this page in the last Layouts update, and some users may find they need to clear their browser cache for the updated JS files to be used, which resolves the issue and the error.

We are reviewing how our JS files are added (we use a lazy-loading script loader) to ensure they ensure the same cache-busting technique as traditionally enqueued files.

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 9 replies, has 2 voices.

Last updated by joshA-2 6 years, 6 months ago.

Assisted by: Nigel.

Author
Posts
#948046
Screenshot from 2018-07-15 23-25-38.png

I am trying to:
View my layouts

Link to a page where the issue can be seen:
wp-admin/admin.php?page=dd_layouts&status=publish

I expected to see:
The layouts i've created

Instead, I got:
Nothing. The filter appears to default to published, but it shows no items where the layouts used to be. If I switch to "trashed" I do get those listed. But the published list is blank. Note that it does show a count of "published" so they're not "gone" they're just not showing up.

I tried disabling all plugins other than toolset.

It could be a coincidence, but this morning I upgraded all of the toolset plugins to the most recent. The versions listed below are what it is now.
Toolset Forms - version 2.0.2 . [was 2.01]
Toolset Layouts version - 2.4 . [was 2.3.1]
Toolset Types - version 3.0.4 . [was 3.0.2]
Toolset Views - version 2.6.3 . [was 2.6.2]

#948287

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-07-16 at 11.50.46.png

Hi there

The latest Layouts update included a change in this page to split the different Layouts into tabs, as you can see in the screenshot.

On large sites the query to list all of the Layouts could prove very slow, which was one of the reasons for the change.

If you are not seeing the same than I expect you should see an error somewhere.

Can you check your browser console for JavaScript errors.

Also, check your PHP logs.

If you haven't already, turn on the debug log by editing your wp-config.php file and change the line with WP_DEBUG like so:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

That will create a file debug.log in your /wp-content/ directory which you can examine in any text editor. Try visiting the Layouts page and then inspect the log. If you don't find the debug.log file it means it didn't generate any warnings or errors.

Let me know what you find.

#948745

Browser console shows the following error:

DDLayout.listing.views[("Listing" + model.get(...) + "View")] is not a constructor
(anonymous)	@	CollectionView.js:50

Ha ha. Maybe the TODO still needs to be done. The source code on that line shows:

	//TODO:do something here to handle API calls / errors
				console.error( e.message );

Does that help pin things down?

#948756

Also, error log showed no errors. file was present, but no lines.

#948971

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Thanks for that.

Could I ask for one last thing, which is to check if that is being triggered by some conflict. Switch theme to twentyseventeen and try again, and disable your non-Toolset plugins and try again.

If you still get the error I'll need a copy of your site to pass to my colleagues to work on to try and identify what the cause is.

hidden link

Let me mark your next reply as private in case you need to pass on site details.

#950102

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-07-18 at 09.44.53.png

Hi Josh

I installed the duplicator package and went straight to the Layouts listing page and it worked fine, so it looks like something server related.

You are using one of the latest PHP versions (7.2.4-1), are you able to change your server settings to use an older version? (My test environment has up to 7.0.10 installed.)

If we are able to identify it as a PHP version issue I can pass that on to the developers.

#950339

I changed the PHP version and that did not fix it.

BUT

The fact it came right up for you made me wonder if it was the browser. I use Chrome. I switched over to firefox and the layout page came up with items populated as expected!

This is the build of chrome I was using:
Version 67.0.3396.99

Can you verify that Chrome does not display this correctly on your end?

#950343

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Chrome is my default browser and is the one I tested this in.

As the issue for you is a JS error, there could be a browser caching issue behind this.

In Chrome can you open the dev tools and then at the top of the browser next to the URL bar if you hold down the reload button you'll see additional options to empty the cache and do a hard reload. Can you try that?

#950391

Well there you go! it was the browser caching. The funny thing I kept clearing the server side caching, but never did the client side. Thanks for your help!

#950398

Just marking this as solved! Support was great!