Looking for Customer Service & Support

IMPORTANT: This is a Community Forum. Answers are given by the community. If you are a Customer, please, Open New Issue to get access to the support service.

Customer Support is only provided through our ticketing system https://support.extly.com/. If you do not have a paid membership, please create a new topic in the community forum.

Broken URLS with AceSEF

More
5 years 9 months ago #4485 by Riccardo
Riccardo created the topic: Broken URLS with AceSEF
I am using AceSEF (to generate SEF - urls) and Autotweet.

When set to "compatibility" mode, Autotweet will generate urls for the articles which do _not_ include the Itemid !!! This is then stored by AceSEF, and all subsequent requests are automatically missing the Itemid.

The issue with not having Itemid is that joomla can't tell which menu I'm on, will not highlight it nor show the right modules.

I tried forcing the generation of the URLs in a content plugin, but apparently this happens _after_ autotweet has generated the urls itself (so it's too late). The code for invoking the JRoute from the backend is below, it does not return the right url (rather it returns the standard Joomla SEF url instead of the AceSEF one) but it will write the correct one to the database:
        function        createSEFURL($articleid, $catid) {
                //http://forum.joomla.org/viewtopic.php?p=2013934
                $live_site = substr(JURI::root(), 0, -1);
                // Check if we are in the backend
                if(JPATH_BASE == JPATH_ADMINISTRATOR) {
                    // In the back end we need to set the application to the site app instead
                    JFactory::$application = JApplication::getInstance('site');
                }
                // Create the URL - frontend and backend

                $url = $live_site . JRoute::_(ContentHelperRoute::getArticleRoute($articleid, $catid));

                // Check if we are in the backend again 
                if(JPATH_BASE == JPATH_ADMINISTRATOR) {
                     // In backend we need to remove administrator from URL as it is added even though we've set the application to the site app
                    $url = str_replace($live_site .'/administrator', $live_site, $url);
                    // Set the appilcation back to the administartor app
                    JFactory::$application = JApplication::getInstance('administrator');
                }

                //JError::raiseNotice(100112, "url generated ". $url);
                return $url;
        }
The topic has been locked.
More
5 years 9 months ago #4486 by Ulli Storck
Ulli Storck replied the topic: Re: Broken URLS with AceSEF
If an SEF Router is well implemented, well installed and well configured, AutoTweet should work correctly. AutoTweet does nothing special: It asks the Joomla JRoute function for the URL and - of course - the generated URL for content articles includes the item ID (This is before the SEF routing is done).

The code you have posted does the same as AutoTweet does.
Do you have also tested with the URL "performance mode" of AutoTweet?

If I read these reviews about AceSEF on JED, I'm not sure if newer versions of AceSEF does really work and are well implemented: extensions.joomla.org/extensions/site-management/sef/15911
The topic has been locked.
More
5 years 9 months ago - 5 years 9 months ago #4488 by Riccardo
Riccardo replied the topic: Re: Broken URLS with AceSEF [SOLVED]
I had chosen "compatibility mode" because I knew AceSEF would cause problems. It is indeed a difficult piece of software to live with.

However another piece of software interfered, RSFirewall which considered Autotweet curl call as a DoS attack. I disabled the feature and now the request goes through in compatibility mode.

If the returned url is still the wrong one (i.e. from my logs):
2012-02-23 10:44:13 ALERT 95.226.92.231 WARNING Error routing SEF URL via frontend request - http error: 404 - callurl =

Request:
/components/com_autotweet/autotweetsefrouter.php?aturl=index.php%3Foption%3Dcom_content%26view%3Darticle%26id%3D7866%3Abla-bla-bla%26catid%3D11%3Ablabla%26Itemid%3D105 -
Response:
/components/com_autotweet/categories
(instead of the sef url).

you may have a renamed url and unless you manually clean AceSEF cache you'll keep getting the error.

Performance mode produced (sometimes) the correct urls in the AceSEF database, but returned a 404-url to Autotweet, so:

To sum-up:
  1. If you use AceSEF you _must_ use compatibility mode.
  2. In order for compatibility mode you need both curl and verify that firewall protection allows the call.
  3. Always clean AceSEF cache when in doubt

You rock! thank you for taking time to answer a request which is unrelated to your product B)
Last Edit: 5 years 9 months ago by Riccardo. Reason: fixed!
The topic has been locked.
More
5 years 9 months ago #4490 by Ulli Storck
Ulli Storck replied the topic: Re: Broken URLS with AceSEF [SOLVED]
Thx a lot for reporting back your experiences.

A review on JED is also welcome: extensions.joomla.org/extensions/social-...l-auto-publish/11120
:-)
The topic has been locked.
Time to create page: 0.124 seconds
Join the Club!

Access and support services to all Extly's extensions for 1-Year. The Extly Club is your source for all of our extensions.

Join Now