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: 78
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! Enthusiast
Joomla! Enthusiast
Posts: 187
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: 78
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

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13083
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.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

EmilyB
Joomla! Intern
Joomla! Intern
Posts: 78
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?

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13083
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?
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

EmilyB
Joomla! Intern
Joomla! Intern
Posts: 78
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

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13083
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.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

EmilyB
Joomla! Intern
Joomla! Intern
Posts: 78
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 :)

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13083
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.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

EmilyB
Joomla! Intern
Joomla! Intern
Posts: 78
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.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13083
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. ;)
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

EmilyB
Joomla! Intern
Joomla! Intern
Posts: 78
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


Post Reply

Return to “Forum Post Assistant (FPA)”