Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to publish posts in certain cases on a sub-domain. #11393

Closed
benoyd opened this issue Nov 2, 2018 · 8 comments
Closed

Not able to publish posts in certain cases on a sub-domain. #11393

benoyd opened this issue Nov 2, 2018 · 8 comments
Labels
Needs Testing Needs further testing to be confirmed. [Status] Needs More Info Follow-up required in order to be actionable.

Comments

@benoyd
Copy link

benoyd commented Nov 2, 2018

Took me a while to figure this one out. I assumed it was a problem with Advanced Custom Fields 5.8.0 Beta 1 & 2. But it turns out that it's not caused by ACF at all. I have been investigating the issue with Elliot & ACF and we've come to the conclusion that Gutenberg can't publish posts on a sub-domain if a plugin that handle meta fields is activated. I tried a different plugin to see if I could replicate the issue (I could). We tried using this on a regular domain with and without www and everything works as intended.
This error did not occur in Wordpress 4.9.8 with Gutenberg plugin.

Info:
Wordpress 5.0 Beta 2.
Advanced Custom Fields 5.8.0 Beta 1 & Beta 2.
Meta Box 4.15.6 (Tried to replicate with this one).
PHP Version 7.15
twentynineteen theme.

Error that occurs:
500 Internal Server Error when trying to POST to:
/wp-json/wp/v2/posts/27?_locale=user
/wp-json/wp/v2/posts/27/autosaves?_locale=user

How to "circumvent":
Commenting out row 137-143 in wp-includes/l10n.php

Edit: Added theme to info.

@danielbachhuber
Copy link
Member

Hi @benoyd,

Can you try reinstalling beta 2? I believe this issue was fixed with https://core.trac.wordpress.org/ticket/45235. Gary rebuilt beta2 but you may have installed the earlier version.

@danielbachhuber danielbachhuber added the [Status] Needs More Info Follow-up required in order to be actionable. label Nov 2, 2018
@benoyd
Copy link
Author

benoyd commented Nov 2, 2018

Hi!

So I downloaded Wordpress 5.0 Beta 2 (again) and re-downloaded Advanced Custom Fields 5.8.0 Beta 2 (again, just to be sure). And I can still replicate the problem.

This is what I did now to re-create the same issue:

  1. Install a (clean) Wordpress 5.0 beta 2.
  2. Download and install Advanced Custom Fields 5.8.0 Beta 2.
  3. Activate Plugin (no need to add any blocks or anything).
  4. Try to Create or Edit a post.
  5. Problem occurs when saving or autosaving or publishing (check the network tab).

NOTE: This was done on a sub domain.

Howl at me here and I'll get back to you if you need any further information.

@danielbachhuber
Copy link
Member

5\. Problem occurs when saving or autosaving or publishing (check the network tab).

Can you share a screenshot of what you see in this case?

Also, can you enable your PHP error log and report any contents of that?

@benoyd
Copy link
Author

benoyd commented Nov 2, 2018

Sure. This is the screenshots I submitted to ACF (hence the date) but it's the same error.
https://imgur.com/a/pZxKBX2

Here is the WP Debug Log:
[02-Nov-2018 14:23:48 UTC] PHP Notice: Undefined variable: twentynineteen_l10n in C:\www\gutter.test.se\wp-content\themes\twentynineteen\functions.php on line 167
[02-Nov-2018 14:30:34 UTC] PHP Fatal error: Uncaught Error: Call to undefined function is_user_logged_in() in C:\www\gutter.test.se\wp-includes\l10n.php:137
Stack trace:
#0 C:\www\gutter.test.se\wp-includes\l10n.php(1051): determine_locale()
#1 C:\www\gutter.test.se\wp-includes\l10n.php(1013): _get_path_to_translation_from_lang_dir('acf')
#2 C:\www\gutter.test.se\wp-includes\l10n.php(983): _get_path_to_translation('acf')
#3 C:\www\gutter.test.se\wp-includes\l10n.php(1081): _load_textdomain_just_in_time('acf')
#4 C:\www\gutter.test.se\wp-includes\l10n.php(170): get_translations_for_domain('acf')
#5 C:\www\gutter.test.se\wp-includes\l10n.php(250): translate('Advanced Custom...', 'acf')
#6 C:\www\gutter.test.se\wp-content\plugins\advanced-custom-fields-pro\acf.php(80): __('Advanced Custom...', 'acf')
#7 C:\www\gutter.test.se\wp-content\plugins\advanced-custom-fields-pro\acf.php(692): ACF->initialize()
#8 C:\www\gutter.test.se\wp-content\plugins\advanced-custom-fields-pro\acf.php(703): acf()
#9 C:\www\gutter.test.se\wp-settings.php(322): include_once('C:\ in C:\www\gutter.test.se\wp-includes\l10n.php on line 137
[02-Nov-2018 14:30:44 UTC] PHP Fatal error: Uncaught Error: Call to undefined function is_user_logged_in() in C:\www\gutter.test.se\wp-includes\l10n.php:137
Stack trace:
#0 C:\www\gutter.test.se\wp-includes\l10n.php(1051): determine_locale()
#1 C:\www\gutter.test.se\wp-includes\l10n.php(1013): _get_path_to_translation_from_lang_dir('acf')
#2 C:\www\gutter.test.se\wp-includes\l10n.php(983): _get_path_to_translation('acf')
#3 C:\www\gutter.test.se\wp-includes\l10n.php(1081): _load_textdomain_just_in_time('acf')
#4 C:\www\gutter.test.se\wp-includes\l10n.php(170): get_translations_for_domain('acf')
#5 C:\www\gutter.test.se\wp-includes\l10n.php(250): translate('Advanced Custom...', 'acf')
#6 C:\www\gutter.test.se\wp-content\plugins\advanced-custom-fields-pro\acf.php(80): __('Advanced Custom...', 'acf')
#7 C:\www\gutter.test.se\wp-content\plugins\advanced-custom-fields-pro\acf.php(692): ACF->initialize()
#8 C:\www\gutter.test.se\wp-content\plugins\advanced-custom-fields-pro\acf.php(703): acf()
#9 C:\www\gutter.test.se\wp-settings.php(322): include_once('C:\ in C:\www\gutter.test.se\wp-includes\l10n.php on line 137

@danielbachhuber
Copy link
Member

Hey @benoyd,

This was the issue that was fixed in beta2. I'm not sure why you're not getting the new build, but should be addressed when beta3 is released at the minimum.

@designsimply designsimply added Needs Testing Needs further testing to be confirmed. and removed [Status] Needs More Info Follow-up required in order to be actionable. labels Nov 2, 2018
@benoyd
Copy link
Author

benoyd commented Nov 5, 2018

Sorry for the late response. This is the link I used to download the Beta: https://wordpress.org/wordpress-5.0-beta2.zip I downloaded it 2018-11-02 15:20 European Standard Time.

I wish I could try Beta 3 that got released, but I'm hestitanting to upgrade since Elliot on ACF reported that the new beta does not save ACF Meta Data fields at all. So I'll have wait til that is fixed, more info here: https://wordpress.org/support/topic/wordpress-5-0-beta3-does-not-save-acf-metabox-data/

@ellatrix
Copy link
Member

What's the status of this issue? Has it been fixed, @benoyd?

@ellatrix ellatrix added the [Status] Needs More Info Follow-up required in order to be actionable. label Jun 24, 2019
@benoyd
Copy link
Author

benoyd commented Jun 24, 2019

Yes, this is no longer an issue :)

@benoyd benoyd closed this as completed Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Needs further testing to be confirmed. [Status] Needs More Info Follow-up required in order to be actionable.
Projects
None yet
Development

No branches or pull requests

4 participants