Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Help deleting an EZ Page in its entirety so it is not recognized by search engines?

Help deleting an EZ Page in its entirety so it is not recognized by search engines?

Started by rubiconpeak on 13 Oct 2012, 10:50 PM · Views: 760

Results 1 to 9 of 9
13 Oct 2012, 10:50 PM
#1
rubiconpeak avatar

rubiconpeak

New Zenner

Join Date:
Oct 2012
Posts:
3
Plugin Contributions:
0

Post #1 by rubiconpeak

We have recently deleted a few pages that were created via EZ Pages, however it appears that the content was deleted and not the actual "page". For instance, our products change from year to year and we deleted the page that represented 2011 since there was a new page created for 2012. The problem that exists is that all of the search engines are recognizing the old page. The old page still exists, but with only the header & footer that is consistent through our site. This was done several weeks ago so I don't think its a caching issue.

My question is: How do you delete on of these 'deleted" EZ Pages entirely so that it is not recognized by search engines?

For reference, here's what's left behind (and recognized by google) after the page was deleted in EZ Pages:

index.php?main_page=page&id=8

Any help would be greatly appreciated.

13 Oct 2012, 10:55 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #2 by gjh42

What method did you use to delete the ez-page? If you remove all of the content from the textbox, but do not "delete" the page in Tools > EZ-Pages Select A Page, you would get the results you describe.

13 Oct 2012, 10:59 PM
#3
rubiconpeak avatar

rubiconpeak

New Zenner

Join Date:
Oct 2012
Posts:
3
Plugin Contributions:
0

Post #3 by rubiconpeak

Thank you for the prompt reply. The entire page was deleted, not just the text from the text box.

13 Oct 2012, 11:25 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #4 by gjh42

In my test site, I can go to an ez-page, change the URL to a page id that never existed, and get the same blank center column you describe.

It should probably go to a "404 not found" page (I think is the right number), but I do not have specific knowledge of the code that handles that.

1 Oct 2013, 2:52 PM
#5
annabelleswigs avatar

annabelleswigs

New Zenner

Join Date:
Jun 2010
Posts:
3
Plugin Contributions:
0

Post #5 by annabelleswigs

I am having the same problem as rubiconpeak - deleted EZ pages, which are deleted using the EZ page editor in admin are still in existence (if blank) and so are being picked up by search engines.. Does anyone have an idea how to delete them completely? Thank you..

1 Oct 2013, 5:10 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #6 by gjh42

The pages are not "still in existence"; as I described above, you can get the same blank ez-page by entering a URL that never existed.

I would think the software should lead to a "404 not found" page for an ez-page that is not in the database.

1 Oct 2013, 7:42 PM
#7
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #7 by lhungil

Here is something you an TRY. It is a QUICK modification with LITTLE QA testing. No guarantee it will work or not break your Zen Cart installation. Feel free to edit to fit your needs.

Change the file "/includes/modules/pages/page/header_php.php". Replace the following (starting at line 31):

$var_pageDetails = $db->Execute("select * from " . TABLE_EZPAGES . " where pages_id = " . (int)$ezpage_id );

//check db for prev/next based on sort orders

with the following:

$var_pageDetails = $db->Execute("select * from " . TABLE_EZPAGES . " where pages_id = " . (int)$ezpage_id );

if ($var_pageDetails->EOF) {

  // Start of stuff which may break things (remove all between Start and End in both places if removing)
  // Redirect, display error page, or continue
  if (MISSING_PAGE_CHECK == 'On' || MISSING_PAGE_CHECK == 'true') {
    zen_redirect(zen_href_link(FILENAME_DEFAULT));
  }
  elseif (MISSING_PAGE_CHECK == 'Page Not Found') {
    $_GET['main_page'] = FILENAME_PAGE_NOT_FOUND;
    $current_page = $_GET['main_page'];
    $current_page_base = $current_page;
    $code_page_directory = DIR_WS_MODULES . 'pages/' . $current_page_base;
    $page_directory = $code_page_directory;
    require($page_directory . '/header_php.php');
  }
  else {
    // End of stuff which may break things
    header('HTTP/1.1 404 Not Found');
    // Request robots such as search engines to not index the page
    $robotsNoIndex = true;
  // Start of stuff which may break things
  }
  // End of stuff which may break things
}

//check db for prev/next based on sort orders

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

10 Oct 2013, 10:36 AM
#8
annabelleswigs avatar

annabelleswigs

New Zenner

Join Date:
Jun 2010
Posts:
3
Plugin Contributions:
0

Post #8 by annabelleswigs

Thank you very much for that lhungil.. I tried it on test site and all seemed OK so I added to my live site and all still seems to be OK - all my EZ pages are displaying fine and those links to deleted pages are now going to the 'page not found' page.. But your suggestion that it might break things has made me slightly nervous and I'm wondering in what way could you conceive that it might break things?! Did you imagine that it might stop the robots indexing any of my ez pages or something like that?

11 Oct 2013, 2:39 PM
#9
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #9 by lhungil

I say "may break", because not everyone's Zen Cart installation is the same (or even close to a stock installation). The modifications above are based on Zen Cart 1.5.x code (the changes were only tested on Zen Cart 1.5.1 installations). The changes may cause issues for those on Zen Cart 1.3.x or with a highly customized / altered installations.

Thank You for letting us know it worked for you! :)

Note: I decided in the "quick fix" to make alterations to the code specific to EZ-Pages... Another method would be to add code to the core Zen Cart file used to handle "product" and "category" not found... Or use an observer attached to 'NOTIFY_HEADER_START_EZPAGE' / 'NOTIFY_HEADER_END_EZPAGE'...

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker