- Title: Member
- Status: Offline
- Registered: 2009-03-01
- Posts: 381
Topic: Company page needs some more fixing
When you delete a company, the url of the deleted company does not return 404 page but a list of all jobs in database.
Example1: example.com/jobs-at/exampleinc
Same goes for: example.com/jobs-at/ or example.com/jobs-at/whatever
Last edited by hobo (2011-08-12 07:38:53)
- Title: Moderator
- Status: Offline
- From: Bangalore, India
- Registered: 2011-09-01
- Posts: 101
Re: Company page needs some more fixing
You should delete the all the jobs linked with that company.
then only we can delete the company permanently
Thanks &Regards
DV Tech Services Pvt Ltd
Email: venkat@dvtservices.com;
www.dvtservices.com Bangalore. India
We are Ready to Resolve your problems ..... And Ready to work for you
- Title: Member
- Status: Offline
- Registered: 2009-03-01
- Posts: 381
Re: Company page needs some more fixing
Indeed, however the link to the now non-existing company page (coming from old search engine result for example) does not return 404 page but a list of all jobs in database.
- Title: Member
- Status: Offline
- Registered: 2009-03-01
- Posts: 381
Re: Company page needs some more fixing
Demo:
jobfeeds.me/job-listings/jobs-by/test
(There are currently no "wall-mart" jobs in database btw.)
NOTE, new demo link with error code.
Last edited by hobo (2012-02-03 20:38:10)
- Title: Moderator
- Status: Offline
- From: Bangalore, India
- Registered: 2011-09-01
- Posts: 101
Re: Company page needs some more fixing
it is not looking for wall mart jobs.
I hope you given suparate jobber base instance for each category.
the wall mart is taking as application extra parameter instead of company name or new page
Please print the following variable you can came to know the many things:
$_app_info['params']
Using the print_r($_app_info['params']);
Thanks &Regards
DV Tech Services Pvt Ltd
Email: venkat@dvtservices.com;
www.dvtservices.com Bangalore. India
We are Ready to Resolve your problems ..... And Ready to work for you
- Title: Member
- Status: Offline
- Registered: 2009-03-01
- Posts: 381
Re: Company page needs some more fixing
Here is the attempted fix for issue I raised in this topic:
This is my new page_company.php
Code:
Code:
<?php
$sanitizer = new Sanitizer();
#if value is blank example.com/jobs-by/ redirect to 404 page-unavailable
if ($id != null)
{
$sql = 'SELECT DISTINCT company FROM '.DB_PREFIX.'jobs';
$comps = $db->QueryArray($sql);
foreach ($comps as $comp)
{
if ($sanitizer->sanitize_title_with_dashes($comp['company']) == $id)
{
$company = $comp['company'];
break;
}
#added redirect to 404 page-unavailable if company name is not in database
else
{
redirect_to(BASE_URL . 'page-unavailable/');
exit;
}
}
}
else
{
redirect_to(BASE_URL . 'page-unavailable/');
exit;
}
$smarty->assign('jobs', $job->ApiGetJobsByCompany($company, false, false));
$smarty->assign('current_company', $company);
$html_title = $translations['companies']['are_you_looking'] . ' ' . $company . '?';
$meta_description = $translations['companies']['meta_part1'] . ' ' . $company . '! ' . $translations['companies']['meta_part2'];
$template = 'company.tpl';
?>
As you can see only the the redirects are added for invalid or expired url id inputs (company names).
Last edited by hobo (2012-02-03 20:04:50)
- Title: Member
- Status: Offline
- Registered: 2009-03-01
- Posts: 381
Re: Company page needs some more fixing
- Title: New member
- Status: Offline
- Registered: Today
- Posts: 6
Re: Company page needs some more fixing
Posts [ 8 ]
Guest posting is disabled. You must login or register to post a reply.