1

In my WordPress website whenever the htaccess file is added to my public_html folder, I have so many errors in my js files. for example:

Uncaught TypeError: gform.initializeOnLoaded is not a function
Uncaught TypeError: gform.addFilter is not a function
Uncaught TypeError: gform.addAction is not a function
Uncaught ReferenceError: fieldSettings is not defined

I have this situation in admin area. In the error examples I'm in Gravity Forms Forms page and get these errors and I can't edit and add form fields, but whenever I delete the .htaccess file, everythings works great. Could anyone tell the reason?

here is my .htaccess file content:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Thanks in advance.

here is the whole error messages:

Uncaught TypeError: gform.initializeOnLoaded is not a function
    at gravityforms.min.js?ver=2.8.0:1:36892
form_admin.min.js?ver=2.8.0:1 Uncaught TypeError: gform.initializeOnLoaded is not a function
    at form_admin.min.js?ver=2.8.0:1:32327
admin.php?page=gf_edit_forms&id=5:367 Uncaught TypeError: gform.addFilter is not a function
    at admin.php?page=gf_edit_forms&id=5:367:19
admin.php?page=gf_edit_forms&id=5:385 Uncaught TypeError: gform.addFilter is not a function
    at admin.php?page=gf_edit_forms&id=5:385:41
admin.php?page=gf_edit_forms&id=5:3439 Uncaught TypeError: gform.addAction is not a function
    at admin.php?page=gf_edit_forms&id=5:3439:86
layout_editor.min.js?ver=2.8.0:1 Uncaught TypeError: gform.addAction is not a function
    at initLayoutEditor (layout_editor.min.js?ver=2.8.0:1:11903)
    at layout_editor.min.js?ver=2.8.0:1:13088
form_editor.min.js?ver=2.8.0:1 Uncaught TypeError: gform.addFilter is not a function
    at form_editor.min.js?ver=2.8.0:1:101542
admin.php?page=gf_edit_forms&id=5:5103 Uncaught ReferenceError: fieldSettings is not defined
    at admin.php?page=gf_edit_forms&id=5:5103:13
admin.php?page=gf_edit_forms&id=5:5109 Uncaught ReferenceError: fieldSettings is not defined
    at admin.php?page=gf_edit_forms&id=5:5109:13
jquery.min.js?ver=3.7.1:2 jQuery.Deferred exception: gform.applyFilters is not a function TypeError: gform.applyFilters is not a function
    at UpdateFormObject (https://example.com/wp-content/plugins/gravityforms/js/form_editor.min.js?ver=2.8.0:1:48827)
    at SetupUnsavedChangesWarning (https://example.com/wp-content/plugins/gravityforms/js/form_editor.min.js?ver=2.8.0:1:85099)
    at InitializeEditor (https://example.com/wp-content/plugins/gravityforms/js/form_editor.min.js?ver=2.8.0:1:1678)
    at HTMLDocument.<anonymous> (https://example.com/wp-content/plugins/gravityforms/js/form_editor.min.js?ver=2.8.0:1:94517)
    at e (https://example.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1:2:27028)
    at t (https://example.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1:2:27330) undefined
ce.Deferred.exceptionHook @ jquery.min.js?ver=3.7.1:2
jquery.min.js?ver=3.7.1:2 jQuery.Deferred exception: fieldSettings is not defined ReferenceError: fieldSettings is not defined
    at HTMLDocument.<anonymous> (https://example.com/wp-admin/admin.php?page=gf_edit_forms&id=5:5078:17)
    at e (https://example.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1:2:27028)
    at t (https://example.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1:2:27330) undefined
ce.Deferred.exceptionHook @ jquery.min.js?ver=3.7.1:2
jquery.min.js?ver=3.7.1:2 Uncaught TypeError: gform.applyFilters is not a function
    at UpdateFormObject (form_editor.min.js?ver=2.8.0:1:48827)
    at SetupUnsavedChangesWarning (form_editor.min.js?ver=2.8.0:1:85099)
    at InitializeEditor (form_editor.min.js?ver=2.8.0:1:1678)
    at HTMLDocument.<anonymous> (form_editor.min.js?ver=2.8.0:1:94517)
    at e (jquery.min.js?ver=3.7.1:2:27028)
    at t (jquery.min.js?ver=3.7.1:2:27330)
jquery.min.js?ver=3.7.1:2 Uncaught ReferenceError: fieldSettings is not defined
    at HTMLDocument.<anonymous> (admin.php?page=gf_edit_forms&id=5:5078:17)
    at e (jquery.min.js?ver=3.7.1:2:27028)
    at t (jquery.min.js?ver=3.7.1:2:27330)
scripts-admin.merge-tags.f33f9eafc12b41c409ab.min.js:1 Uncaught (in promise) TypeError: v(...).applyFilters is not a function
    at z (scripts-admin.merge-tags.f33f9eafc12b41c409ab.min.js:1:4152)
    at D (scripts-admin.merge-tags.f33f9eafc12b41c409ab.min.js:1:4358)
    at R (scripts-admin.merge-tags.f33f9eafc12b41c409ab.min.js:1:6056)
    at scripts-admin.merge-tags.f33f9eafc12b41c409ab.min.js:1:7606
    at Array.forEach (<anonymous>)
    at Z (scripts-admin.merge-tags.f33f9eafc12b41c409ab.min.js:1:7562)
    at J (scripts-admin.merge-tags.f33f9eafc12b41c409ab.min.js:1:8151)
    at Module.K (scripts-admin.merge-tags.f33f9eafc12b41c409ab.min.js:1:8169)
    at scripts-admin.min.js?ver=3f4921e72df656e7033d9c15a5dcd295:1:23585

Here is my error_log file contents:

[11-Dec-2023 13:44:46 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:44:46 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:44:46 UTC] PHP Fatal error:  Failed opening required '/home/example1/public_html/xmlrpc.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in Unknown on line 0
[11-Dec-2023 13:48:53 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:48:53 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:48:53 UTC] PHP Fatal error:  Failed opening required '/home/example1/public_html/xmlrpc.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in Unknown on line 0
[11-Dec-2023 13:48:53 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:48:53 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:48:53 UTC] PHP Fatal error:  Failed opening required '/home/example1/public_html/xmlrpc.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in Unknown on line 0
[11-Dec-2023 13:48:54 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:48:54 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:48:54 UTC] PHP Fatal error:  Failed opening required '/home/example1/public_html/xmlrpc.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in Unknown on line 0
[11-Dec-2023 13:48:55 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:48:55 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:48:55 UTC] PHP Fatal error:  Failed opening required '/home/example1/public_html/xmlrpc.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in Unknown on line 0
[11-Dec-2023 13:48:55 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:48:55 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:48:55 UTC] PHP Fatal error:  Failed opening required '/home/example1/public_html/xmlrpc.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in Unknown on line 0
[11-Dec-2023 13:53:03 UTC] PHP Warning:  Undefined array key "color" in /home/example1/public_html/wp-content/plugins/advanced-accordion-block/advanced-accordion-block.php on line 146
[11-Dec-2023 13:53:03 UTC] PHP Warning:  Undefined array key "color" in /home/example1/public_html/wp-content/plugins/advanced-accordion-block/advanced-accordion-block.php on line 148
[11-Dec-2023 13:53:44 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:53:44 UTC] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[11-Dec-2023 13:53:44 UTC] PHP Fatal error:  Failed opening required '/home/example1/public_html/xmlrpc.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in Unknown on line 0
6
  • it's likely the actual cause if further up the console, and causing the follow up errors. Rather than trying to fix the most recent error listed, start with the first error listed and share that. There's a high chance that 404's and 500's are present. Without that information though it's very difficult if not impossible to diagnose the problem
    – Tom J Nowell
    Dec 11, 2023 at 11:42
  • I edited my question and added the whole error messages. Dec 11, 2023 at 12:12
  • “whenever I delete the .htaccess file, everythings works great” - Although presumably the website itself doesn’t work (except for the homepage) when you delete the ‘.htaccess’ file?
    – MrWhite
    Dec 11, 2023 at 12:56
  • Yes, just the homepage is working but the errors in the dashboard are not showing and I can add, edit fields in the Gravity Forms forms page. Dec 11, 2023 at 13:18
  • are you sure those are the very first messages that appear in the console and not the most recent? Have you raised this issue with gravity forms? Questions about 3rd party plugins are offtopic here, so you can't ask for help with a gravity forms issue
    – Tom J Nowell
    Dec 11, 2023 at 14:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.