Skip to content

Commit f1e03e7

Browse files
committed
3.0.3 bugs
1 parent 6a955b1 commit f1e03e7

File tree

5 files changed

+36
-23
lines changed

5 files changed

+36
-23
lines changed

CHANGELOG.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,7 @@
4747
* FF Bug - /adaptcms/admin/links(polls) :: clearfix
4848
* Bug - /adaptcms/js/admin.articles.js :: line 317 getContent() on tinyMCE
4949
* Bug - /adaptcms/admin/fields/edit/2 :: remove hidden-xs class.
50-
* TODO Bug - Issues with including JS repeatedly on an angularJS admin page. Clearing cache fixes it, but need a better solution.
51-
* Bug - Adjust datepicker so after selecting date, it hides. Good way to see how this gets annoying as is, is on the polls add page.
50+
* Bug - Issues with including JS repeatedly on an angularJS admin page. Clearing cache fixes it, but need a better solution.
51+
* Bug - Adjust datepicker so after selecting date, it hides. Good way to see how this gets annoying as is, is on the polls add page.
52+
* Bug - If an error is found when loading plugins in bootstrap, all cache is wiped.
53+
* Bug - Related to the previous one, major issue with opcache and multiple adapt sites - changed it so there is a prefix with a md5 hash of the script path, so cache is unique.

UPGRADE.md

+3-17
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,9 @@ After SQL is inserted, go into your admin panel and clear the cache. You should
4242

4343
####Issues?
4444

45-
If you encounter a white page, enter in the following code on line 146 of <strong>app/Config/bootstrap.php</strong>:
46-
47-
`
48-
clearCache(null, 'models');
49-
clearCache(null, 'persistent');
50-
clearCache(null, 'views');
51-
clearCache(null, '/../templates');
52-
53-
if (function_exists('apc_clear_cache'))
54-
{
55-
apc_clear_cache();
56-
apc_clear_cache('user');
57-
apc_clear_cache('opcode');
58-
}
59-
`
60-
61-
Save and then load your site once and you should see it load normally. Remove that code and reload, everything should be resolved.
45+
If you encounter any issues, such as a blank white page or an internal server error - please submit a ticket:
46+
47+
http://www.adaptcms.com/support
6248

6349
3.0.1 - 3.0.2
6450
-------------

app/Config/bootstrap.php

+15-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,21 @@
144144
'AdaptcmsCacheDispatcher'
145145
));
146146

147-
CakePlugin::loadAll();
147+
try {
148+
CakePlugin::loadAll();
149+
} catch(Exception $e) {
150+
clearCache(null, 'models');
151+
clearCache(null, 'persistent');
152+
clearCache(null, 'views');
153+
clearCache(null, '/../templates');
154+
155+
if (function_exists('apc_clear_cache'))
156+
{
157+
apc_clear_cache();
158+
apc_clear_cache('user');
159+
apc_clear_cache('opcode');
160+
}
161+
}
148162

149163
require_once("config.php");
150164

app/Config/core.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
}
247247

248248
// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
249-
$prefix = 'adaptcms_';
249+
$prefix = 'adaptcms_' . (!empty($_SERVER['SCRIPT_NAME']) ? md5($_SERVER['SCRIPT_NAME']) : '');
250250

251251
/**
252252
* Configure the cache used for general framework caching. Path information,

app/View/AdaptcmsView.php

+13-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,18 @@ public function render($view, $layout)
135135
protected function _evaluate($viewFile, $dataForView) {
136136
$viewFileModified = filemtime($viewFile);
137137
$tempFile = str_replace(APP, '', $viewFile);
138-
$tmpFile = strtolower(Inflector::slug($tempFile)) . '.tmp';
138+
139+
if (strstr(basename($tempFile), 'layout')) {
140+
if ($this->disable_parsing) {
141+
$append = '_1';
142+
} else {
143+
$append = '_0';
144+
}
145+
} else {
146+
$append = '';
147+
}
148+
149+
$tmpFile = strtolower(Inflector::slug($tempFile)) . $append . '.tmp';
139150

140151
$cache = TMP . 'templates' . DS;
141152

@@ -248,7 +259,7 @@ public function _parse($file, $content)
248259
$replace[] = $var;
249260
}
250261

251-
if ($is_layout && !$this->disable_parsing) {
262+
if ($is_layout) {
252263
$headers = '
253264
<?php echo $this->Html->script("jquery.min") ?>
254265
<?php echo $this->Html->script("jquery.validate.min") ?>

0 commit comments

Comments
 (0)