[FIXED] Cannot create events

Brettflan

Active Member
Kyros said:
Hi there :) I am very excited to use this addon. However I can't seem to create events for groups. Always get this error:
Oops! We ran into some problems.
Requested group could not be found.
There doesn't appear to be any errors in the logs.
Kyros
I have this same problem when trying to create events. I saw Kyros was asked about "friendly URLs"; I have the "Use full friendly URLs" option disabled myself.
 
It's seem you are not using Friendly URLs. Can you turn it on and confirm it?
 
I'm using Nginx rather than Apache and would prefer not to set up special configuration to support full friendly URLs, when I don't plan to use that feature other than to test it for you. Is there anything else I can check for you?

EDIT:
This is with Social Groups 2.1.4 in XenForo v2.1.6 Patch 1.
 
Last edited:
Further, when viewing a group category (not when viewing the main groups index), clicking on the Filters to try changing the sorting there, it pops up an error:
Oops! We ran into some problems.
The requested page could not be found.
I'm guessing this problem is likewise happening because I don't have the "Friendly URLs" XenForo option enabled, since it is similar to the other error.

Do you plan to properly support sites which don't use the "Friendly URLs" setting?
 
I have tested without Friendly URLs enabled and it's working. Please verify with your server config.
 
OK, on a test server, I have confirmed it is definitely a problem related to Full Friendly URLs. I tested again trying to add an event, and got the "Requested group could not be found" error.
I then went ahead and added in Nginx directives to support Full friendly URLs and enabled that setting in the XenForo admin panel.
I tested creating an event again, and lo and behold, it was successfully created. No error.
I then disabled the "Full Friendly URLs" setting in the XF admin panel. I tried creating another event, and I got the "Requested group could not be found" error again.
I enabled that setting again, and tried creating an event again, and it worked again without an error.

Perhaps whatever redirects you have that enable "Full Friendly URLs" to work (Apache .htaccess or nginx directives or whatever) are making it work for you regardless of that admin panel setting?


EDIT:
After the above, I then checked to see if I could reproduce the problem with the Filters dropdown when viewing a group Category. I can't reproduce that on this test server (still happens on live server), so I'll investigate it further.
 
This might help. I decided to monitor HTTP headers being sent, and noticed that the URL which is being called when trying to save the new event is "/index.php?groups/events/add&group_id=1". Notice the "&" rather than just "&", at a guess it looks like it's had htmlentities() or similar used on it (XenForo automatic sanitization?). I tested again with "Full friendly URLs" on, and the URL which was called was "/groups/events/add?group_id=1". No "&" needed or used for that URL.
 
I ran a similar test of HTTP headers for the problem with that Filters dropdown.

Viewing the category "Clans" (ID 2) on our live forum and clicking on the Filter button on the right leads to the URL "/index.php?groups/categories/filters&_xfRequestUri=%2Findex.php%3Fgroup-categories%2Fclans.2%2F&_xfWithData=1&_xfToken=<token_removed>&_xfResponseType=json", and gives a "The requested page cannot be found" error.
Viewing a category "Clans" (ID 1) on a test forum and clicking on the Filter button on the right leads to the URL "/index.php?groups/categories/clans.1/filters&_xfRequestUri=%2Findex.php%3Fgroups%2Fcategories%2Fclans.1%2F&_xfWithData=1&_xfToken=<token_removed>&_xfResponseType=json", and works without a problem.

I notice that part of the working test forum URL includes "categories/clans.1/filters" (with the category indicated) while the same part of the non-working live forum URL is just "categories/filters" (no category indicated). However, after looking for any configuration differences for the Social Groups addon between the two forums, I couldn't find anything that seemed like it might cause the problem.
Then I did notice a difference; the test forum was still running Social Groups 2.1.3. I updated it to 2.1.4, and now it is getting the same error.

So, the error was apparently introduced in the 2.1.4 update. I further found that since the test forum is in development mode, it outputs a more detailed error:
The requested page could not be found. (Code: invalid_action, controller: Truonglv\Groups:Group, action: CategoriesFilters).

Anyway, tracking the cause of that error down should be more easy since it showed up between versions 2.1.3 -> 2.1.4.
 
Back
Top