PDA

Просмотр полной версии : Проблема с форматированием кода и временем генерации страницы после переноса сайта


Ивано
22.11.2012, 14:14
Добрый день.

Вел разработку двух сайтов на одной системе typo3 4.7.2. И решил разъединить сайты.
Скачал пакет blank typo3 4.7.2

Начал переносить сайт и часть перенес - хостинг один и тот же и в пределах одной корневой папки (т.е. для нового домена просто зарегистрирована папочка). НО - есть два существенных отличия после переноса сайта:

1. Время генерации:

на старом
<!-- Cached page generated 22-11-12 13:06. Expires 23-11-12 13:06 -->
<!-- Parsetime: 0ms -->

на новом (перенесенном)
<!-- Cached page generated 22-11-12 13:06. Expires 23-11-12 13:06 -->
<!-- Parsetime: 250ms -->

2. Форматирование html-кода:

на старом очень аккуратное:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--
—————————————————————————————————————————————————— ——————

—————————————————————————————————————————————————— ——————
This website is powered by TYPO3 - inspiring people to share!
TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.
TYPO3 is copyright 1998-2012 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
Information and contribution at http://typo3.org/ and http://typo3.org/
-->
<base href="http:///">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon; charset=binary">
<link rel="icon" href="http:///fileadmin//favicon.ico" type="image/x-icon; charset=binary">
<meta name="generator" content="TYPO3 4.7 CMS">
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="http://.ru/typo3temp/stylesheet_fad97d0aa7.css?1353518896" media="all">
<link rel="stylesheet" type="text/css" href="http://.ru/fileadmin//depo.css?1353531955" media="all">
<link rel="stylesheet" type="text/css" href="http://.ru/fileadmin//content.css?1353523139" media="all">
<link rel="stylesheet" type="text/css" href="http://.ru/typo3temp/stylesheet_d6c2774dc9.css?1353518896" media="all">
<script src="http:///fileadmin/libraries/jquery.1.7.1.js?1347878607" type="text/javascript"></script>
<script src="http:///fileadmin//document-ready.js?1353506859" type="text/javascript"></script>
<script src="http:///typo3temp/javascript_5612d999eb.js?1353519102" type="text/javascript"></script>
<title></title>
</head>
<body>

а вот на новом html-тэги как-то все разбросаны и вставлены лишние переводы строк:

<!DOCTYPE html>
<html>
<head>

<meta charset="utf-8">
<!--
—————————————————————————————————————————————————— ——————

—————————————————————————————————————————————————— ——————

This website is powered by TYPO3 - inspiring people to share!
TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.
TYPO3 is copyright 1998-2012 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
Information and contribution at http://typo3.org/
-->

<base href="http://.ru/">
<link rel="shortcut icon" href="http://fileadmin//favicon.ico" type="image/x-icon; charset=binary">
<link rel="icon" href="http:///fileadmin//favicon.ico" type="image/x-icon; charset=binary">

<meta name="generator" content="TYPO3 4.7 CMS">
<meta name="keywords" content="">
<meta name="description" content="">

<link rel="stylesheet" type="text/css" href="http://.ru/typo3temp/stylesheet_fad97d0aa7.css?1353542176" media="all">
<link rel="stylesheet" type="text/css" href="http://.ru/fileadmin//depo.css?1353546150" media="all">
<link rel="stylesheet" type="text/css" href="http://.ru/fileadmin//content.css?1353546150" media="all">
<link rel="stylesheet" type="text/css" href="http://.ru/typo3temp/stylesheet_d6c2774dc9.css?1353542176" media="all">



<script src="http://.ru/fileadmin/libraries/jquery.1.7.1.js?1353542160" type="text/javascript"></script>
<script src="http://.ru/fileadmin//document-ready.js?1353546150" type="text/javascript"></script>
<script src="http://.ru/typo3temp/javascript_5612d999eb.js?1353542176" type="text/javascript"></script>


<title></title>


</head>
<body>


--
Старая версия typo3 - это inducation.
Ни как не пойму, что не включил в настройках новой typo3?
Или скачана не та версия typo3?

Ивано
22.11.2012, 14:19
Хорошо - ну с первой проблемой вроде бы как-то само решилось...
Наверное это было из-за нагрузок на сайт:

стало показывать:
<!-- Cached page generated 22-11-12 13:12. Expires 23-11-12 13:12 -->
<!-- Parsetime: 0ms -->

А вот в чем причина такого разбросанного форматирования html-:confused:кода?

P.s.
Идею ведения разнотипных сайтов на одной системе - просто выкидываю из головы...

Ивано
22.11.2012, 16:49
Все оказалось очень сложно - причина такого форматирования в seo_basics - он его создает...
Ни и не когда бы не подумал, что причина в нем...:):(:confused::mad:

$TYPO3_CONF_VARS['EXT']['extConf']['seo_basics'] = 'a:2:{s:10:"xmlSitemap";s:1:"1";s:16:"sourceFormatting";s:1:"1";}'; // Modified or inserted by TYPO3 Extension Manager.

UPDATED

Before the extension can be installed the database needs to be updated with new tables or fields.
Please select which operations to perform:

Enable features

Enable the Google XML Sitemap[xmlSitemap]
This enables the Sitemap used for Google, available under www.yourdomain.com/sitemap.xml
(галочка)

Enable the HTML Source Formatter[sourceFormatting]
Does nice indention to the HTML output of your website.
(галочка)

The extension has been installed.

Close window.