Forum Post Assistant throws 404 error Topic is solved

This Forum board is about discussions about the FPA tool.

Moderator: General Support Moderators

Post Reply
EmilyB
Joomla! Intern
Joomla! Intern
Posts: 97
Joined: Sun Jan 10, 2010 4:52 pm

Forum Post Assistant throws 404 error

Post by EmilyB » Sun Sep 11, 2022 8:58 am

Hi,

I am trying to use the Forum Post Assistant to create the file to post on here with my issue/question. I followed the instructions and uploaded the file to the root of my Joomla 4 folder (where admin and configuration are). I run it in my url leaving file permissions set to 644 that didn't work so I changed file permissions to eventually 777 but it still throws the following error:

404 Page not found Call stack # Function Location 1 () JROOT/libraries/src/Router/Router.php:153 2 Joomla\CMS\Router\Router->parse() JROOT/libraries/src/Application/CMSApplication.php:1069 3 Joomla\CMS\Application\CMSApplication->route() JROOT/libraries/src/Application/SiteApplication.php:820 4 Joomla\CMS\Application\SiteApplication->route() JROOT/libraries/src/Application/SiteApplication.php:228 5 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:278 6 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:63 7 require_once() JROOT/index.php:33

Does anyone know what I am doing wrong?

Kind regards
Last edited by toivo on Sun Sep 11, 2022 1:04 pm, edited 1 time in total.
Reason: mod note: moved from 4.x General Questions

User avatar
cmbay
Joomla! Explorer
Joomla! Explorer
Posts: 250
Joined: Thu Dec 31, 2009 11:53 pm
Location: Oregon, USA

Re: Forum Post Assistant throws 404 error

Post by cmbay » Sun Sep 11, 2022 5:21 pm

EmilyB wrote:
Sun Sep 11, 2022 8:58 am
I followed the instructions and uploaded the file to the root of my Joomla 4 folder (where admin and configuration are).
To clarify, what is the exact name of the file that you uploaded?
I run it in my url...
What is the full (anonymized) URL that you place in your browser's address line to invoke the FPA?
Charles

EmilyB
Joomla! Intern
Joomla! Intern
Posts: 97
Joined: Sun Jan 10, 2010 4:52 pm

Re: Forum Post Assistant throws 404 error

Post by EmilyB » Sun Sep 11, 2022 6:35 pm

Hi charles,

this is the url I run (anonymised):

https://www.mysite.com/fpa-en.php

I don't know if this is related, but I just noticed this very same error for a cron job php file I am trying to run, its throwing the exact same 404 error as posted above

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Forum Post Assistant throws 404 error

Post by sozzled » Sun Sep 11, 2022 6:52 pm

Is there a menu item in the [backend] Menu Manager for your website (such as an 'External URL") that points to the FPA? A screenshot of your menu items may help. Also check the trashed menu items.

These errors are not coming from the FPA script.

EmilyB
Joomla! Intern
Joomla! Intern
Posts: 97
Joined: Sun Jan 10, 2010 4:52 pm

Re: Forum Post Assistant throws 404 error

Post by EmilyB » Sun Sep 11, 2022 7:03 pm

Hi sozzled,

no there is no such menu item. Do I need to create one?

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Forum Post Assistant throws 404 error

Post by sozzled » Sun Sep 11, 2022 7:05 pm

I was just checking. No, do not create a menu item for this.

Is your J! website locate in a subfolder of another J! website?

EmilyB
Joomla! Intern
Joomla! Intern
Posts: 97
Joined: Sun Jan 10, 2010 4:52 pm

Re: Forum Post Assistant throws 404 error

Post by EmilyB » Sun Sep 11, 2022 7:06 pm

No,

its in the public_html folder of my cpanel

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Forum Post Assistant throws 404 error

Post by sozzled » Sun Sep 11, 2022 7:09 pm

Rename the file .htaccess as htaccess.old and try again.

EmilyB
Joomla! Intern
Joomla! Intern
Posts: 97
Joined: Sun Jan 10, 2010 4:52 pm

Re: Forum Post Assistant throws 404 error

Post by EmilyB » Sun Sep 11, 2022 7:21 pm

After all that, it was the htaccess file!

It runs. I am using akeeba admin tool htaccess maker so it must be a setting in that.

Thank you sozzled. I can now create my post :)

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Forum Post Assistant throws 404 error

Post by sozzled » Sun Sep 11, 2022 7:31 pm

You're welcome. It may be an idea to create use the file htaccess.txt (included with every release of J!), make a copy of it and rename the copy as .htaccess. The renamed htaccess.txt file should work instead of the one you were using before.

EmilyB
Joomla! Intern
Joomla! Intern
Posts: 97
Joined: Sun Jan 10, 2010 4:52 pm

Re: Forum Post Assistant throws 404 error

Post by EmilyB » Sun Sep 11, 2022 7:47 pm

Thank you. I have just taken a copy from the j4 download and overwritten the admin tools version.

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Forum Post Assistant throws 404 error

Post by sozzled » Sun Sep 11, 2022 7:54 pm

Good idea. I have nothing against Akeeba Admin Tools; I've used it for years with my J! 3.x websites but I have stopped using it for J! 4.x. I prefer to use the standard "htaccess" that ships with J!.

One thing I would mention about the standard "htaccess" for J! 4.x (it's different to the one used in J! 3.x) is to be wary of lines 139-172 that read

Code: Select all

## GZIP
## These directives are only enabled if the Apache mod_headers module is enabled.
## This section will check if a .gz file exists and if so will stream it
##     directly or fallback to gzip any asset on the fly
## If your site starts to look strange after enabling this file, and you see
##     ERR_CONTENT_DECODING_FAILED in your browser console network tab,
##     then your server is already gzipping css and js files and you don't need this
##     block enabled in your .htaccess
<IfModule mod_headers.c>
	# Serve gzip compressed CSS files if they exist
	# and the client accepts gzip.
	RewriteCond "%{HTTP:Accept-encoding}" "gzip"
	RewriteCond "%{REQUEST_FILENAME}\.gz" -s
	RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA]

	# Serve gzip compressed JS files if they exist
	# and the client accepts gzip.
	RewriteCond "%{HTTP:Accept-encoding}" "gzip"
	RewriteCond "%{REQUEST_FILENAME}\.gz" -s
	RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]

	# Serve correct content types, and prevent mod_deflate double gzip.
	RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1]
	RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]

	<FilesMatch "(\.js\.gz|\.css\.gz)$">
		# Serve correct encoding type.
		Header append Content-Encoding gzip

		# Force proxies to cache gzipped &
		# non-gzipped css/js files separately.
		Header append Vary Accept-Encoding
	</FilesMatch>
</IfModule>
I delete these lines on my J! 4.x sites because they're unnecessary and they're been known to cause the "double gzip" problem we often read about on this forum. ;)

EmilyB
Joomla! Intern
Joomla! Intern
Posts: 97
Joined: Sun Jan 10, 2010 4:52 pm

Re: Forum Post Assistant throws 404 error

Post by EmilyB » Sun Sep 11, 2022 8:55 pm

Thanks for that heads up, it actually solved another problem I was having exactly as you said relating to gzip - even though it was disabled in Joomla. I have now removed it from htaccess.

Thanks for all your help it is most appreciated

TomEhrhorn
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Apr 10, 2023 9:53 pm

Re: Forum Post Assistant throws 404 error

Post by TomEhrhorn » Wed Jul 12, 2023 6:51 pm

I'm having the same problem. When I try "https://www.somename.org/fpa-en.php" I get a 404 Not Found Error. I did the rename of htaccess without success. Then I renamed the htaccess.txt to htaccess and I deleted the GZIP lines. Still no success. Thank you.

User avatar
cmbay
Joomla! Explorer
Joomla! Explorer
Posts: 250
Joined: Thu Dec 31, 2009 11:53 pm
Location: Oregon, USA

Re: Forum Post Assistant throws 404 error

Post by cmbay » Wed Jul 12, 2023 7:42 pm

Please confirm that your fpa-en.php file is in the same folder as the configuration.php file for the website in question. Also let us know the permissions for the fpa-en.php file.
Charles

User avatar
cmbay
Joomla! Explorer
Joomla! Explorer
Posts: 250
Joined: Thu Dec 31, 2009 11:53 pm
Location: Oregon, USA

Re: Forum Post Assistant throws 404 error

Post by cmbay » Wed Jul 12, 2023 7:45 pm

TomEhrhorn wrote:
Wed Jul 12, 2023 6:51 pm
Then I renamed the htaccess.txt to htaccess and I deleted the GZIP lines.
Did you remember to place the leading dot in the file name?
.htaccess
Charles

TomEhrhorn
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Apr 10, 2023 9:53 pm

Re: Forum Post Assistant throws 404 error

Post by TomEhrhorn » Fri Jul 14, 2023 4:20 pm

cmbay wrote:
Wed Jul 12, 2023 7:42 pm
Please confirm that your fpa-en.php file is in the same folder as the configuration.php file for the website in question. Also let us know the permissions for the fpa-en.php file.
Yes, they are in the same folder. My fpa-en.php has permissions 0644.

TomEhrhorn
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Apr 10, 2023 9:53 pm

Re: Forum Post Assistant throws 404 error

Post by TomEhrhorn » Fri Jul 14, 2023 4:22 pm

cmbay wrote:
Wed Jul 12, 2023 7:45 pm
TomEhrhorn wrote:
Wed Jul 12, 2023 6:51 pm
Then I renamed the htaccess.txt to htaccess and I deleted the GZIP lines.
Did you remember to place the leading dot in the file name?
.htaccess
I did not. But, I just changed it and the result was the same 404 Not Found.

User avatar
cmbay
Joomla! Explorer
Joomla! Explorer
Posts: 250
Joined: Thu Dec 31, 2009 11:53 pm
Location: Oregon, USA

Re: Forum Post Assistant throws 404 error

Post by cmbay » Fri Jul 14, 2023 5:12 pm

Setting aside the 'not found' fpa-en.php file temporarily, how is the site itself working? Which Joomla version is it running? 3.10.12? 4.3.3? If you run a link checker on the site, are there many errors shown? If you put a phpinfo.php file in the root directory of the site does it run?
Charles


Post Reply

Return to “Forum Post Assistant (FPA)”