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

Unable to load the requested language file #4196

Closed
jvanschaijik opened this issue Apr 3, 2024 · 7 comments
Closed

Unable to load the requested language file #4196

jvanschaijik opened this issue Apr 3, 2024 · 7 comments
Assignees
Labels
Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.

Comments

@jvanschaijik
Copy link

After upgrading from EE 7.4.5 to EE 7.4.6 users began to receive this error when trying to submit entries on the front end using Channel Form:
Unable to load the requested language file: language/english/spam/stopwords.php
I was able to resolve the issue temporarily by uninstalling the Spam module.

Environment Details:

  • Version: EE 7.4.6
  • PHP Version: 8.1.2
  • MySQL Version: 8.0.3
  • Web Server: Ubuntu2.14
@bryannielsen
Copy link
Contributor

@jvanschaijik I was trying to reproduce this with a simple channel form in a test site with the spam module installed but I haven't gotten an error like yours yet. Could you share a simplified version of the Channel Form template perhaps?

Also can you confirm that your spam module contains the language file at system/ee/language/english/spam/stopwords.php. The contents are here if it is missing in your install.

@bryannielsen bryannielsen self-assigned this Apr 3, 2024
@jvanschaijik
Copy link
Author

Thanks for looking at this Bryan.
I have the language file where it is supposed to be.
And this is a simplified version of the template:

{exp:channel:form 
	channel="reading_tips" 
	return="members/tips" 
	status="open|draft"
	id="mijn-formulier"
	class="mijn-formulier"
	url_title="{segment_3}"
	author_only="yes"
	include_assets="yes"
	include_css="no"
}

	<label for="title" class="form-label">Title of the piece you want to link</label>
	<input type="text" class="form-control" name="title" id="title" value="{title}" size="50" maxlength="100">
	
	<input class="form-control" type="hidden" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50">

	<label for="status" class="form-label mb-0 mt-2">Status</label>
	<select name="status" id="status" class="form-select">
		{statuses}
			<option value="{status}" {selected}>{status}</option>
		{/statuses}
	</select>
	
	<label for="categories" class="form-label mb-0 mt-2">Category</label>
	{category_menu}
		<select class="form-select" name="category[]">
			{select_options}
		</select>
	{/category_menu}

	<label for="link" class="form-label mt-2">Link (URL) to the piece</label>
	<input type="text" dir="ltr" id="link" name="link" value="{link}" class="form-control">

	<label for="why_do_you_recommend_it" class="form-label mt-2">Explain why you like it (max 200 characters)</label>
	<textarea id="why_do_you_recommend_it" name="why_do_you_recommend_it" class="form-control" maxlength="200" rows="4">{why_do_you_recommend_it}</textarea>

	<label for="tip-author" class="form-label mt-2">Author of the piece (e.g. Roger Scruton)</label>
	<input type="text" dir="ltr" id="tip-author" name="tip-author" value="{tip-author}" class="form-control">

	<label for="source" class="form-label mt-2">Source (e.g. 'Wall Street Journal' or 'Fox News')</label>
	<input type="text" dir="ltr" id="source" name="source" value="{source}" class="form-control">
							
	<input type="submit" class="btn btn-primary mt-4" name="submit" value="Submit tip">

{/exp:channel:form} 

@intoeetive
Copy link
Contributor

@jvanschaijik are you also using translation files (in user/language folder)? If yes, is the spam/stopwords.php file there?

@jvanschaijik
Copy link
Author

Not that I am aware of. I haven't touched any language settings. The user/language folder only has the index.html file in it.

@bryannielsen
Copy link
Contributor

@jvanschaijik there's two strange things here -

  1. You have the language file that the error says can't be loaded
  2. The spam module is being loaded for you on channel form entry submission

I'm having a hard time reproducing the error because 2. doesn't happen for me on a fresh EE7 install. Could you look at your exp_extensions table and see if there are any extensions using either the channel_form_submit_entry_start or channel_form_submit_entry_end hooks?

I still think 1. sounds like a bug but I'm unable to reproduce it so far

@bryannielsen bryannielsen added the Bug: Unconfirmed Bug report that is not yet confirmed and/or is not reproducible. label Apr 4, 2024
@jvanschaijik
Copy link
Author

Bryan, as far as I can tell, my extensions table is empty.

@bryannielsen
Copy link
Contributor

bryannielsen commented Apr 18, 2024

There is a related report in the forums too - https://expressionengine.com/forums/topic/253919/error-when-trying-to-post-a-comment. I'm having a hard time replicating this behavior though. @robinsowell any chance you could try to reproduce this too?. Nevermind I finally got it!

@bryannielsen bryannielsen added Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on. and removed Bug: Unconfirmed Bug report that is not yet confirmed and/or is not reproducible. labels Apr 18, 2024
bryannielsen added a commit that referenced this issue Apr 22, 2024
Resolved #4196 where Spam stopwords language file could not be loaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.
Projects
None yet
Development

No branches or pull requests

3 participants