By Joomlafans on Saturday, 01 September 2018
Posted in General Issues
Replies 12
Likes 0
Views 610
Votes 0
Greetings.
When I use a code in .htaccess to remove trailing slashes from the website URL. EasyArticles front end composer returns with an empty page and an (invalid token) message when I try to publish an article.

How can I fix this?
Hey,

I am really sorry for the delay of this reply as it is a weekend for us here. May I know what code was removed?

Is it possible for you to provide us with the back end and FTP access to your site to check on this issue? You may store your site access at http://stackideas.com/dashboard/site so you don't have to provide these information all the time
·
Saturday, 01 September 2018 16:11
·
0 Likes
·
0 Votes
·
0 Comments
·
I use the following rules in .hcaccess in order to redirect non-www to www and trailing dashes etc

## Turn on rewrite engine
RewriteEngine on

## Check if not directory and ends in /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
## If not a directory skip next RewriteRule
RewriteRule ^ - [S=2]

## Check if HTTPS and WWW
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [OR,NC]
RewriteCond %{https} off

## This RewriteRule skipped if URI was a directory
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

## This RewriteRule used if URI was a directory
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [S=1]
RewriteRule ^(.*)/$ https://www.example.com/$1 [R=301,L]
## End - Custom redirects

This causes the following issues

EasyArticles
(invalid token) message when I try to publish an article.

Komento.
Comments don't get published after clicking post
js error
site-3.1.2.min.js:100 Uncaught TypeError: f.replace is not a function

Easy Discuss
Upload image and video modal window is empty with an exclamation sign in in the middle of it.

how can I fix this?
please note that when I remove the mentioned rules from the .hcaccess file all extensions function normally.
·
Thursday, 13 September 2018 18:30
·
0 Likes
·
0 Votes
·
0 Comments
·
I would need the access to the site to troubleshoot the problem as I need to see what is causing these issues.
·
Thursday, 13 September 2018 18:57
·
0 Likes
·
0 Votes
·
0 Comments
·
I have updated this post with Admin access and FTP information of the test site. Kindly have a look.
·
Thursday, 13 September 2018 19:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey,

Once I am logged into the FTP , I am only seeing this, http://take.ms/fb9eF . Can you please set the FTP user with the appropriate privileges?
·
Thursday, 13 September 2018 19:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry for that. user only had access to a sub-directory. its now fixed. please check.
·
Thursday, 13 September 2018 19:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you give this a try again? I have applied some fixes on the AJAX urls.
·
Thursday, 13 September 2018 21:46
·
0 Likes
·
0 Votes
·
0 Comments
·
I can publish articles in EA now. can you please tell me what you did so I can apply it on the main site?

There is also this issue with EA in Multi language sites. when its active. it forces the second language page to load the default language herf tags in html. you can see this in the same test site.

More importantly what about the issues with Komento and Easy Discuss I mentioned above? they are still not working with the htaccess rules applied.
·
Friday, 14 September 2018 10:17
·
0 Likes
·
0 Votes
·
0 Comments
·
We modified on your following files on your site ->

JoomlaFolder/administrator/components/com_easyarticles/includes/ajax/ajax.php
JoomlaFolder/administrator/components/com_komento/includes/ajax/ajax.php
JoomlaFolder/administrator/components/com_easydiscuss/includes/easydiscuss.php


Can you give it a check is it other also work fine?
·
Friday, 14 September 2018 14:12
·
0 Likes
·
0 Votes
·
0 Comments
·
They work perfectly now ! thank you.

Would you be so kind as to tell me what code did you replace and with what? so I can have a better understanding for future websites using the same extensions.
·
Friday, 14 September 2018 16:03
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome.

All these will solved in next release version.

EasyArticles - http://take.ms/zh8AA
Komento - http://take.ms/FnFFT
EasyDiscuss - http://take.ms/xgSio
·
Friday, 14 September 2018 17:23
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post