Joomla search result urls are incorrect - joomla

I am using Joomla 2.5.4 and when I search using the Search component, the urls are not what they should be.
The expected url should look like this:
/desktop-projects/78-projects/76-project
/<MenuItem>/<Category>/<Article>
The actual search result urls look like this:
/component/content/article/78-projects/76-project
When it links to this /component/content/article/ style url, the page doesn't have the modules assigned to the menu item. Why doesn't it have the menu item in the url?
I have noticed that other modules/components link this way as well, is there something I'm missing ?

It sounds like your search result is not showing on to the correct URL on your website.
In your search module, there is an option called "Set ItemID".
This allows you to select the menu item which the URL will use.
If you leave this blank, then your search component could use another menu item which is of type search.

Related

Why Joomla shows contents with any URL?

I found a bug in my Joomla 3.6.4 site when I searched in google for test purpose.
For example I have a content with ID 34 and alias myalias
Now Unexpectedly all of below URLs load my content:
http://example.com/test-test-test/34-myalias
http://example.com/mytest/34-myalias
http://example.com/hellowwwwwwwwwwwww/34-myalias
http://example.com/aything/34-myalias
and so on.
This is not TRUE at all!! The content must be loaded just in my predefined menu item. For example I assign a new Menu Item in Menu Manager like definedmenu witch shows content 34. So below URL should works only:
http://example.com/definedmenu/34-myalias
What is the problem. It's bad for my website SEO...
Thanks.
http://example.com/index.php?option=com_content&view=article&id=34&name=ram&age=30
here
http://example.com/index.php is a base url
and
option=com_content&view=article&id=34&name=ram&age=30
these are input variables
when we change url to SEO url
http://example.com/index.php/content/article/34/ram/30
so
http://example.com/test-test-test/34-myalias
http://example.com/mytest/34-myalias
http://example.com/hellowwwwwwwwwwwww/34-myalias
http://example.com/aything/34-myalias
"test-test-test" treat as input variable
"mytest" treat as input variable
but each component have some restriction in component route, in content "id-alias" format so "34-myalias" but here id is important
http://example.com/test-test-test/34-myaliasdfdfdfd it will work
http://example.com/test-test-test/34-sdsdsdmyalias it will work
but
http://example.com/test-test-test/sdsd34-myalias it will not work
This is why many people turn to SEO components like
RSSEO! https://www.rsjoomla.com/joomla-extensions/joomla-seo.html
or
sh404SEF https://weeblr.com/joomla-seo-analytics-security/sh404sef

Magento: www.mysite.com/?SID="number" is appearing in one of the google urls

I was searching on all my urls using site:www.mysite.com to check if they are all redirecting well, but I found one of the url in google search have www.mysite.com/?SID="long number".
How to remove this url from google
Thanks in advance
It is possible to remove url parameters in google webmastertools.
On the Dashboard, under Crawl, click URL Parameters.
Next to the parameter you want, click Edit. (If the parameter isn’t listed, click Add parameter. Note that this tool is case sensitive, so be sure to type your parameter exactly as it appears in your URL.)
If the parameter doesn't affect the content displayed to the user, select No ... in the Does this parameter change... list, and then click Save. If the parameter does affect the display of content, click Yes: Changes, reorders, or narrows page content, and then select how you want Google to crawl URLs with this parameter. -- URL parameters - Webmaster Tools Help

Retrieve the content of a section via MediaWiki API

I have a MediaWiki page set up in my company's intranet.
I would like to get the content of a section in a specific page using MediaWiki API (through AJAX).
I would like to refer to the section by its title like 'General' and refer to the page by its title as well, like 'Licenses'.
Is it possible somehow?
The only thing I could achieve is referring to the page by its title and refer to the section by a number like this:
http://mywiki.local/wiki/api.php?format=xml&action=parse&prop=text&page=Licenses&section=1
But let's say I create a new section before 'General' I would have to update all my AJAX URLs that queries this page. So this isn't good enough.
I couldn't find any working solution for this. Any ideas?
You can do this by first retrieving prop=sections to get the list of sections and their numbers:
http://en.wikipedia.org/w/api.php?format=xml&action=parse&prop=sections&page=License
Then make your original request, with the section number you figured out based on the previous request.
Keep in mind that two different sections can have the same name.

create dynamic template for joomla 1.5

there are tutorials on the web about gow to create index.html, css file and template.xml that contain placeholders. ok, i got it, it's simple. but i need a template that has some different views. for example:
-all pages have a topmenu, header, left sidebar, mainarea and a footer but:
-first page has no header .topmenu after which sidebar, mainarea and footer comes.
-second page has sidebar moved from left to right
-third page has four blocks (blocks for special offers) instead of mainarea.
as far as i can see, i need to create three standalone templates with unique set of placeholders for each template. because i can't see the way to change laarge mainarea placeholder with four placeholders for offers blocks on some pages. dynamically.
is there if-statements in joomla templates to simply determine a document id to view four placeholders instead of mainarea. or to not show header on the main page (f.e. doc. id="mainpage")
but i want it to be selectable like:
-this page has first case of that template (index_1.php)
-and that page has a second case of the same template (index_2.php)
like a selectbox.
is that possible?
I will make this an answer as opposed to a comment since I believe it will do what you are looking for.
Once your articles are setup and your links to them are established (the site has the info on it you're looking for), you can create the modules containing the data that you want shown from time to time.
Go to the module manager - on the right you should see 'module assignment' or something along the lines of 'display this module on the following pages'; you can then pick which pages you want the module to show on. You can specify all pages, none, specific pages, however you want.
This will enable you to show them only where needed however you like.
You can ALSO do this programatically inside the module (if you do custom HTML and use an extension like Sourcerer to add PHP to the module) with PHP should you want a little more flexibility, but just choosing the pages to show on should work for what you're doing.

Why is my menu item resulting in a file not found error in Joomla?

I have a new component called com_location. It has a single model,
controller, and view. If I go to the page URL manually (i.e.
mysite.com/index.php?option=com_location&view=location) it displays my
view correctly (all the view does right now is display a table
containing a bunch of records from the database.)
However, when I add a menu item of type Internal Link, it doesn't
work. I select Internal Link, then Locations -> Location - >Default
Layout (my only choice.) I set the title to Find a Community, and the
alias to find-a-community. The generated link shown in the Link input
field (non-editable) is index.php?option=com_location&view=location -
exactly the same URL I can type in manually.
When I go to my front-end, the Find a Community link is there;
clicking on it produces the URL mysite.com/find-a-community, and
instead of my component, I get an error message: "The requested URL /
find-a-community was not found on this server."
I do have search engine-friendly URLs enabled in the global
configuration.
Help?!
If you disable SEF urls does it work? If so, you will need to write a router.php file
http://docs.joomla.org/Routing

Resources