Subcategories not appearing, so correct module assignments not applied

5 years 2 weeks ago #8088 by sebrennan
Hello,

Thank you for writing such a useful tool. I've been attempting to use many of the K2 modules for a news site, broken into multiple categories and subcategories. As I'm sure you know, if a URL is http://site/FINALCATEGORY/article, the module assignment doesn't realize this isn't the homepage, and applies all of the homepage modules. If I were to go to http://site/parentcategory/subcategory/FINALCATEGORY/article, the module assignments work perfectly.

I purchased SEF Advance because I need the full category tree to work. The categories I'm using are in K2. Keeping K2 and the "standard" joomla content sync'd is a real pain, and so I'm hoping to only need to worry about the K2 content. Since Joomla generates those links when the page and modules are rendered, using the standard Joomla link creation method. That's the setup.

Without your tool, I can get http://site/FINALCATEGORY/article all nice and pretty, using SEF settings with no category IDs or article IDs. This works, other than the modules. If I manually create a URL that is http://site/parentcategory/subcategory/FINALCATEGORY/article, it doesn't work, but if I double up on the FINALCATEGORY, (http://site/parentcategory/subcategory/FINALCATEGORY/FINALCATEGORY/article) it works just fine.

So you can see what I'm hoping to get here. I'd like for the URL generated by SEF Advance to use the subcategories, so the modules will display or not correctly, and I'd like for the incoming URL to not require the double-final category it does now.

I'm including my nginx config (obfuscated) so you can see what's there and how this is setup.

server {
listen 80;
server_name SOMESERVERNAME.com;
server_name_in_redirect off;

access_log /var/log/nginx/SERVERNAME.access_log;
error_log /var/log/nginx/SERVERNAME.error_log info;

root /var/www/vhosts/SOMESERVERNAME.com/beta/;
index index.php index.html index.htm default.html default.htm;
add_header X-Content-Type-Options nosniff;
# Support Clean (aka Search Engine Friendly) URLs
location / {
try_files $uri $uri/ /index.php?$args;
}

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi.conf;
}

# caching of files
location ~* \.(ico|pdf|flv)$ {
expires 1y;
}

location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
expires 14d;
}
client_max_body_size 100M;
}

The issue is that when I re-enable SEF Advance, I'm getting 404s, and it is also not generating the URL correctly, so the URLS only have the FINALCATEGORY, which is what I have now. Please let me know if there's something I'm doing wrong, or if you would like additional information from me.

Please Log in or Create an account to join the conversation.

5 years 2 weeks ago #8089 by sebrennan
IF I made a "fake" menu, with the necessary root slugs, and never actually put it somewhere, but used it to drive links, I can probably skip over the SEF Advanced completely. Until I hear back as far as why the product isn't working, I'm going to solve it the best I can (not optimally... http://site/parentcategory-subcategory-finalcategory/item vs http://site/parentcategory/subcategory/finalcategory/item ) but at least the site will function and only load the right modules at the right times. This is just in case someone else follows this thread later and has the same or similar issues. There is a solution for now, while we wait to hear back about this plugin.

Please Log in or Create an account to join the conversation.

5 years 2 weeks ago #8091 by Saka
Hello,

I will have to look into the site setup and code to be able to understand the problem, but generally SEF Advance tries to generate links independent of menu structure, unlike Joomla and its core solution. For 3rd party component SEF Advance uses extensions ( www.sakic.net/products/sef-advance/#extensions ) for URL generation. Have you tried the one for K2?

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

5 years 1 week ago #8094 by sebrennan
The versions of the plugins provided for K2 stops at "1.6"

I'll give it a try, but so far, this has been rather difficult to manage. I believe I'm missing something, so I'll continue to work on the routes and see if somehow things come together, but so far, I'm struggling a bit.

Please Log in or Create an account to join the conversation.

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

Stay in touch