Forum Replies Created
February 25, 2013 at 6:21 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102825February 22, 2013 at 5:58 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102823
No specific problem I’m seeing (I don’t see any problems by NOT having the standalone free plugin installed, either). More just that, every time we want to update TEC now, I’m going to have to make manual changes to hack them to compatibility, so I need to make sure I fully understand the required changes for the purpose of reproducing them down the road :-)February 20, 2013 at 5:06 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102821
Can you tell me the line numbers where the plugin path is set directly by the PRO addon (not simply reading the pluginPath variable)? I did a brief search and did not find any that were hard-coded in, but may have missed some.February 20, 2013 at 4:30 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102819
Re: “TEST C” – Yes. If you constantly flush the rewrite_rules, the 404s are eliminated.
Sorry I misunderstood what you were asking when you were asking if the standalone plugin was required – the theme built-in option is sufficient, which means I did not have to complete steps 1 or 3 (or, for that matter, step 0 ;-))
Bypassing the version check in TEC-PRO by commenting out lines 642, 644 (not in your original list), and 646 allows the pro plugin to function.February 19, 2013 at 7:55 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102817
With just your fix installed:
- The issue described in TEST POINT D no longer occurs.
- The WPML 404 issues still occur, as described in TEST POINT B, above. The “fix” described in TEST POINT C still serves as a workaround.
The PRO version does not work on its own; it requires the free plugin to be activated and at the latest version in order to function.February 19, 2013 at 12:32 am in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102815
That appears to have fixed the 404s, but upon trying to enable the PRO addon (without the standalone free version), generated two further errors:
The first error given was: “To begin using Events Calendar PRO, please install the latest version of The Events Calendar.” In addition, going to Events > Help also says that the plugin is out of date, and references the latest version as 2.0.11. I ‘fixed’ this error by changing all instances of 2.0.9 with 2.0.11 in lib > the-events-calendar.class-.php
The second error was: “Your version of The Events Calendar is not up-to-date with one of your The Events Calendar add-ons. Please update now.” This error is thrown on line 646 of events-calendar-pro.phpFebruary 17, 2013 at 2:22 am in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102813
Hey Nick –
I was able to replicate the situation of my setup by following the steps as described below.
1) Install a fresh installation of WP 3.5.1
2) Install and activate Incarnation (latest)
3) Set permalink structure to %postname%
4) Import theme demo data
TEST POINT A: everything works
5) Install and activate WPML (latest)
6) Configure WPML: English default, Chinese (Trad) as 2ndary language, all other options as defaults
7) Create dummy translated pages: from Pages > All Pages click the plus sign (+) beside a page to be ‘translated’ – from the edit page, click the ‘Copy Content from English’ button, enter a page title (eg. Sermons-ZH-HANT), then publish. Do this for a few of the other pages, just to be thorough.
TEST POINT B: navigate to any English page which you have translated; use the menu to swap to Chinese; use the menu to swap back to English; navigate to any page in English using the main menu. You will get 404 errors.
8) Add flush_rewrite_rules(false); to functions.php
TEST POINT C: conducting test B will no longer produce 404 errors.
9) Install and activate The Events Calendar (free – latest)
TEST POINT D: on the English version of the site, navigate to Sermons; click on the first sermon link (‘sermonium’) – you will get a 404; return to Sermons; click on the sermon category link (e.g. ‘Morning Sermons’) – you will get a 404
There are different orders you can do things in, but that gets you to where I am at.
My live setup, obviously, has a few different options and configurations set – but none functionally affect the above behaviour.February 14, 2013 at 4:10 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102810
Hey Nick -
Don’t suppose we’ve had any luck on this front, eh?
Worse comes to worse, we’ll go live with the site with it “as-is” (with the flush rewrite rules in place, and not using the pro version of the events calendar) but just wanted to bump this up lest it fall to the second page ;-)
-BreanneJanuary 31, 2013 at 4:26 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102808
kk… I will make my support contact there aware that there is already a connection that’s been made.January 30, 2013 at 10:41 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102806January 30, 2013 at 8:46 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102802
FYI – updated to Incarnation 1.6 and WPML 220.127.116.11, no change in behaviour.
PeterJanuary 30, 2013 at 4:03 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102801
A diff of the wp_router files mentioned shows the files are identical between the built-in and standalone versions of the plugin.January 30, 2013 at 4:58 am in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102800
Can’t recall if I looked at that bit of code directly or not; I’ll check it when I’m back “in the office” (so to speak) tomorrow.
The folks from WPML have suggested that you may want to work directly with them to resolve the apparent compatibility problem. See the latest post in this thread:January 29, 2013 at 5:31 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102797
For the hell of it, I did a fresh install of WordPress, WPML and Incarnation – to be able to reduce potential trouble spots.
Steps taken to reproduce:
WordPress+WPML+TwentyTwelve – works okay.
WordPress+WPML+Incarnation – 404s occur (except when rewrite rules are flushed in functions.php, which works around the issue).
Revert back to TwentyTwelve – 404s occur until permalinks are cleared.
So it’s not an issue with the subdirectory install, since everything works fine using the default WP theme. It’s something to do with the permalink generation that Incarnation is doing.January 28, 2013 at 5:23 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102795
So! Here’s a fun one.
I noticed that there is a new version of WPML out today, and updated to it. In the patch notes:Quote:WPML 2.6.4 fixes the language switcher for product pages on some e-commerce sites, archive page slug translation, default Chinese locale, Finnish locale for WordPress core translation, and some robustness improvements for our language configuration files.
Given that this was one of the originating issues, I went and re-added the flush_rewrite_rules(false) to the theme’s functions.php file.
And… guess what.
All of it.
No 404s on default language, no 404s on sermon archives, etc.
(Other than the pesky presence of the flush_rewrite_rules, that is.)
[edit to add]
Please don’t shoot me :P
Everything works… so long as I don’t install the standalone version of The Events Calendar. If I do, then I get the same rewrite problems as before, where the sermon categories and individual posts don’t work.
This is SO convoluted, I’m about ready to say just screw using The Events Calendar PRO… just eat the cost and leave it be. At this point, I can’t tell where WPML, TEC and the theme begin and end… the problem could be in any of them, or in the interaction of any of them :-/January 28, 2013 at 4:49 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102794
Ugh, that sucks. Thanks, Nick. The thought of it being in a subdirectory messing things up had crossed my mind, but I’d eliminated it after reading some other support posts on WPML‘s site (particularly this one: http://wpml.org/forums/topic/wp-in-sub-directory-using-wpml/ – and the fact that it works on http://www.icanlocalize.com/site/) – hadn’t seen that particular link. I guess I’ll have to follow-up with WPML for a real solution (even if it’s just futzing with the .htaccess), since neither of those “rules” are going to work for this client.January 22, 2013 at 4:33 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102790
Thanks Nick. WPML is still also investigating. Maybe it’s a race to who can find the problem(s) first? :-)
PeterJanuary 18, 2013 at 4:26 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102784
Yeah – we’re using the archive because we have 3 different language communities, so we’re using categories to determine what language the posted sermon is in – while still making all sermons available regardless of what language you’re viewing the site in. So, we get a listing of all English sermons by looking at the English archive, even if we’re browsing the site in Cantonese.
CPT – I’ve tried both with ‘translate’ and ‘do nothing’ set. No change.
Will set you up the account right away. Just be aware that the WPML guys also have a set of credentials, so they may be in there too at times (if you see strange stuff happening).January 18, 2013 at 4:20 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102782
Heh – as soon as I added has_archive to the sermon registration, the built-in event calendar stopped working, too.
(But again, at least the problem is only happening when WPML is enabled – and only on default language pages, secondary/Chinese pages are fine).
The latest status is now exactly the same as zenbatgara described here: (http://www.kriesi.at/support/topic/with-wpml-i-get-404-not-found-for-pages-in-default-language) … which appears to be a bug between WPML and the theme, without any other plugins being installed or enabled.
(Oh, and for kicks, I tried the first suggestion solution again – changing to is_tax as the only conditional in that one statement … no dice)
So bizarre…January 18, 2013 at 4:00 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102779
The good news: I have managed to get the behaviour of the site to remain the same whether I manually flush the rewrite rules (using both/either flush_rewrite_rules and avia_flush_rewrites()) or not. This means that the sermon archives are now working at all times.
This was done by adding “has_archive” to the sermon_categories args in register-sermons.phpCode:register_taxonomy(“sermon_categories”,
array( “hierarchical” => true,
“label” => “Sermon Categories”,
“singular_label” => “Sermon Categories”,
“rewrite” => true,
“has_archive” => true,
“query_var” => true
The bad news: I still get 404s on every other page of the site, and whereas previously flushing the rewrite rules in functions.php would cause the pages to work (but not the sermons), now the flush does not resolve the problem.January 18, 2013 at 3:20 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102778
Yeah, I tried commenting that out (the conditional, the delete, and other variations) yesterday – worked at it for several hours – no dice.
WPML has confirmed that the 404 issues are not as a result of their plugin; see link: http://wpml.org/forums/topic/yet-another-404-error/#post-97562
It is worth remembering as well that the issue only occurs when the standalone events calendar is installed, and does not occur with the built in one. So focusing on WPML may have been a red herring all along, as TEC+Incarnation is where the funky interaction is happening…
I also did a full diff of The Events Calendar code which is currently available (2.0.10) and the one that comes preinstalled with the theme. There were changes made in their rewrites as part of their 3.5 update, which is what made me curious if the theme had also had its similar updates made. That said, I couldn’t see anything in the diff’d code (of TEC) that made it obvious to me as to where the conflict would have been introduced.
I’m going to dig further into rewrite rules… learning more about WP than I ever thought possible…
[edit to add: I should also say that, even if it were to work, I'm not really satisfied with the of having rewrites fire on every page load, as that's a highly unnecessary server cost which we should be able to remedy with a root-cause fix]January 17, 2013 at 10:02 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102775
Okay, I just finished analyzing the diffs in their entirety, including the big block of gobbldigook in the option_value column. What follows is a list of all changes between the two versions:
in wpx_options, option_id 60038 (rewrite_rules) is removed and re-inserted as 60042 (rewrite_rules). I have confirmed there are no changes to the option_value block (which is the part that is several megs large).
in wpx_options, option_id 60037 (avia_rewrite_flush) is removed and NOT re-inserted.
Thus, the only actual difference is the absence of the avia_rewrite_flush in the options table.
It is set in function-set-avia-ajax.php:Code://flush rewrite rules for custom post types
And removed in function-set-avia-backend.php:Code:function avia_flush_rewrites()
Where does that leave us? I have no idea ;-)
Well, I tried manually calling avia_rewrite_flush in my functions.php file and can confirm that the following occurred:
I saved the theme options
Immediately went to a sermon archive page
Sermon archive page gave a 404 (rather than working once, and only subsequently giving the 404)
So, it would appear as though there may be something about the way that the avia flush is happening that is causing problems? Maybe? If I’m lucky?January 17, 2013 at 9:26 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102774
Like I said when Dude suggested it, I did clean uninstall of WPML and the issue didn’t seem to go away at all (though I admit that I’ve done so many iterations of testing, I can’t recall the exact behaviour I saw upon doing so, and given that I’ve got WPML actually working on my site, I’m loathe to do an uninstall of it while they’re trying to debug it). I only reverted after testing that. /shrug
I’ve also reviewed the diff between the two versions and note that the following rewrite is present in wp_options prior to the page refresh (when everything works), and missing thereafter (when things no longer work):
< <table name=”wpx_options”>
< <column name=”option_id”>60037</column>
< <column name=”option_name”>avia_rewrite_flush</column>
< <column name=”option_value”>1</column>
< <column name=”autoload”>yes</column>
The block for the option_value (which is where the bulk of the volume is coming from) is also flagging on the diff, and I haven’t dug into that in its entirety… but it would seem to me that the above might be a place to start, given that we’re talking specifically about a problem with rewrite_rules, no?January 14, 2013 at 4:28 pm in reply to: With WPML, I get "404 not found" for pages in default language #103409
FYI – I have reported this same error to WPML. You can see the support thread here: http://wpml.org/forums/topic/yet-another-404-error/
PeterJanuary 12, 2013 at 10:45 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102768
Reuploaded the theme, to see if that would make a difference. Seemed to… sermon category archives and individual pages started working!
Except I had 404s on the rest of the pages.
Put flush_rewrite_rules( false ); in functions.php and the 404s on the rest of my site go away… but come back on the sermon category archives and individual pages.
 I managed to get it momentarily working by changing the permalink structure about 5 times in a row, but it’s now back to the above (404 on all non-sermon/event page) behaviour.January 12, 2013 at 9:12 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102767
More testing results:
On my test (clean) install, I copied over the wp_options table from my live (problem) install. The problem that I had previously only seen on live was now happening on test.
I then cleared out the avia_incarnation_options record from wp_options on test, and then did a save on the theme options from the admin panel in order to regenerate the theme options record with the default values. The problem that I had seen on live no longer occurred on test – therefore, the problem was corruption in the theme settings having been saved to wp_options.
But here’s where it gets weird.
On a hunch, I went and just did a “save” on the theme settings page on my live set up – perhaps by re-saving, I would overwrite the corruption.
This caused me to be able to see a single sermon OR single sermon category archive… once. If I tried to reload the page, or otherwise view a sermon archive or single sermon page, it would 404 on me. If I go back and save the theme settings, it’ll again work… once. But not again, until I refresh the theme settings.
But then… I nuked the theme options from wp_options on live, reinstantiated them, etc. (same as I’d done on test) and the problem still is fixed for one pageview after saving the theme… and then broken thereafter.January 12, 2013 at 6:59 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102766
Okay more info.
It seems to have something to do with the slugs on the events and sermons.
For example, I had created a category of sermons called “English” and a category of events called “English”.
I initially noticed the issue in that I went to rename the slugs for the events (so as to be unique from the sermons’) and found that the sermon slugs had changed as well.
What’s interesting is that I had created my categories and slugs using the built-in event calendar plugin and it let me use the same slug for both sermon and event categories. It no longer does so, which is fine, as the new plugin enforces uniqueness in the slugs.
Now, one would think I could resolve this by deleting all of my categories in both events and sermons, and then recreating them with unique slugs. Alas, no such luck. Same issues, even after deleting all the categories, giving unique slugs, etc.
Every time I made a chance, I rewrote the permalinks, and even did a flush of the rewrite rules.
Finally, to further complicate things, it looks like it could be a case of corrupt data being cached somewhere as a result of the problem I had with the slugs being non-unique. On a different site and server, I tried doing a clean install of WP3.5 plus the theme, plus a standalone version of TEC, plus even WPML (to rule it out) and cannot reproduce the issue.
Will keep investigating… and hoping I don’t have to re-set-up all of my work to-date. If anyone has any ideas for caches that may be causing problems, or other taxonomy-related ideas… love to hear them.January 12, 2013 at 4:07 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102765
It isn’t WPML, because it occurs when TEC is the only active plugin. The only time the incompatibility arises is when I am using the latest version of TEC and this theme. I can’t try testing with another theme, because the sermon type is defined by this theme.
Just popping in to say that my styling issue was related to having disabled the call to the config file for the built-in version of the plugin; when I put that call back in, thing seemed to be resolved (which makes sense).January 10, 2013 at 4:15 pm in reply to: Event Calendar (Standalone) Causes 404 on Sermon Pages #102761
Hey Nick – this does not appear to have resolved the problem:
still give 404 errors (I have cleared the browser cache – not using WP caching right now – disabled all plugins, regenerated permalinks, no change).
It also introduces a new problem, in that any sermon category archive page which does not have any sermons redirects to an event page, rather than giving the category page and the note that there were no posts in that category.
e.g. With the fix, http://wccac.net/external/sermon_categories/english/ redirects to http://wccac.net/external/event/english-sunday-school/
Of note, I’ve disabled the PRO version of the addon, so as to ensure that any fixes we test are being tested only on the free version of TEC.