Skip Navigation

[Resolved] WP Router Placeholder Page

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

Problem:
I try to display a page using the Events Calendar Community Events Plugin, but only the WP Router Placeholder Page is displayed along with this error:

Warning: Missing argument 2 for WP_Router_Page::get_title() in .../wp-content/plugins/the-events-calendar-community-events/vendor/wp-router/WP_Router_Page.class.php on line 144

When I deactivate WP Views, the page displays correctly.

Solution:
https://toolset.com/forums/topic/wp-router-placeholder-page/page/2/#post-453150

This support ticket is created 7 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 19 replies, has 5 voices.

Last updated by Clifford 5 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#450664

I am trying to: display a page using the Events Calendar Community Events Plugin

I visited this URL: hidden link

I expected to see something like what is displayed here: hidden link

Instead, I got: WP Router Placeholder Page

When I deactivate WP Views, the page displays correctly. When I do the same thing on a test server, I get the following error message in addition to the above WP Router Placeholder Page. Warning: Missing argument 2 for WP_Router_Page::get_title() in /nas/content/staging/westal2015/wp-content/plugins/the-events-calendar-community-events/vendor/wp-router/WP_Router_Page.class.php on line 144

It is working on several other of my sites. Any help is greatly appreciated.

#450844

Dear Joe,

It might be a compatibility problem, the PHP error is from another plugin "the-events-calendar-community-events".

Since I do not have a copy of it, and can not duplicate same problem, please describe detail steps to duplicate same problem, provide downloadable URL for the the plugin/theme needed.

I need to test and debug it in my localhost, thanks

#451072

I will post a download link shortly. How can I make that post private--as I'd like to give you a password to go with this login as well?
User: Toolset

Access: hidden link

This is just a test version, so feel free to break the site if needed.

#451201

I have enabled the private detail box, please please describe detail steps to duplicate same problem, provide downloadable URL for the plugin/theme needed.

#451865

Thanks for the details, checking it in your website, will feedback if there is anything found

#451888
1056.JPG
1055.jpg

I can not duplicate same problem in my localhost(Fresh wordpress installation):
1) download the and activate the plugin "the-events-calendar-community-events"
see screenshot 1055.JPG
2) open the add event page in front-end, it works fine, see screenshot 1056.JPG

3) Then I checked in your website:
Deactivate plugins and switch to default theme, the problem still exists. Since there might be some difference between your website settings and my localhost, please provide a downloadable URL for your website database dump file, I need to test it in my localhost, thanks

#452044

removed-by-admin

#452152

Thanks for the details, I am downloading the file, will feedback if there is anything found

#452175

Thanks for the details, I can duplicate same problem, and escalated this thread to our 2nd supporters, hope they can find a workaround.

#452701

Could you make the post with the link a private post please?

#452964

Hello Joe, this is Beda, 2nd Tier.

I try to replicate this problem and have my troubles doing so.

I can see it on your site and the duplicator, I can see the code that is failing on that plugin, but I can not see what setting causes this.

It must be a very specific Setting in either Views, or the Plugins you are using.

BTW you are not alone with this issue.
In the Event Plugin Support, the error is well known (without solution) and also in our forum, there is another report:
https://toolset.com/forums/topic/problem-with-modern-tribe-events-calendar/

So, I am sure there is a conflict, but I can not spot it.

1. Since when does this happen

2. Can you pinpoint me what you changed from the default settings of the Plugins?
I already played with templates and such, but it still works fine on my end.

3. Is there a specific Setting in Views that you changed, or do you use Views in collaboration with that Plugin somehow?

I also saw that the plugins are pending an update, is it possible for you to update, and send me both Updated versions in a ZIP, uploaded to the Google Drive?
So we can exclude any outdated code.

I also edited your post with the admin link - I deleted it.

#452997

Just changing the Post status here.

#453054

OK, I think I was able to replicate this also on a clean install.

It is due to the WordPress Archive Views.

As soon you have such a Archive View assigned to the Start/Blog Archive, the error happens.

As a temporary workaround you might disable that (unassign the WordPress Archive) and then the Event Forms should work again.

I will report this to the Developers and consult what we can do here.

#453095

Awesome. I checked and this does seem to resolve. Great. Keep me posted for a more permanent fix if possible, Thanks!

#453150

Juan
Supporter

Timezone: Europe/Madrid (GMT+02:00)

Hi Joe

Thanks for the feedback and the report.

This is Juan, lead Views developer. I was also able to replicate this issue, and I spent some time debugging it. To explain what is happening here I need some background. Sorry for the lengthy comment, but I promise it will be worth it 🙂

When applying a WordPress Archive to an archive page, we first check whether we are in that archive page. We do so using a WordPress action, named pre_get_posts, and we do it at the natural priority, which is 10 by default. Not sure whether you are familiar with WordPress hooks, but an action is just an event that gets executed at some point on the natural page render flow. So we have a callback attached to that action, on the natural priority 10, which means it does get executed not too early and not too late. In our callback, we check whether we are on an archive page, whether that archive page has a WordPress Archive assigned, and we initialize our rendering process in case all is correct.

Now, this other plugin The Events Calendar: Community Events does something on its own. It creates some faked pages, like this one to create an event over events/community/add, but aso some others over events/community/edit, events/community/delete, events/community/list, and some more. The way it creates them is not actualy creating a post for them, but it registers a permalink route, that matches those listed above, and when it detects that someone is accessing any of those routes, it loads the matching page: to add an event, to edit it, etc etc.

The main problem here is that all those routes, as they do not match actual pages, in the eyes of WordPress are basically the homepage with some dressing. That is why the mechanism thay this plugin uses to display its content, after checking that you are using one of their registered routes, later tells WordPress that this should not be managed as a home page, by turning a variable to FALSE. That check and adjustment is also done, surprise, on pre_get_posts, at the same priority of 10.

And now, here comes the conflict. When a WordPress Archive from Views is assigned to the home page, we check this very same variable, and as we register our callback eariler, we do get that we are in the home page, right before they decide and set that we should not be in the home page. That is why those dummt pages created by this community events plugins do display our WordPress Archive set for the home page: because in all truth, their dummy pages are the home page until they set it not to be.

What can we do there? Well, actually too little. The documentation for this very action states that is it OK to check whether you are in the home page right there, on this same priority of 10:
https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts
In fact, all the examples in that page will fail when used together with this plugin.

The solution can not be on our side. If I had to guess, I would say that the solution should be on this other plugin side. If you load a custom route that links to faked pages and you need to check whether you are in one of them, and then set that you are not on the home page, you need to do it as soon as possible.

The plugin is using this library here:
hidden link
If they accept a suggestion,I would recommend them to move the cllback for this action here:
hidden link
from the natural priority of 10 to maybe 0 or a negative value, so they ca be sure they do not cause issues on third parties, like they did on us.

Now, regarding what you can do, I would recommend opening a support ticket in their tracking system, explaining all that I tried to explain here. I would do it myself but as it is a premium plugin you do need to have a subscription. Of course, I am completely open to follow up with this and provide any extra reasoning or example that you might need in that ticket.

Hope it helps.

Regards.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.