Implemented 3.12.4 broke your tos and privacy pages? Read this.

Status
Not open for further replies.

Rodolfo

Chevereto Developer
Chevereto Staff
Joined
Oct 7, 2008
Messages
16,259
Likes
4,225
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
#1
Hey there,

In 3.12.4, a nasty bug caused by my negligence causes that empty pages at /content/pages override both tos.php and privacy.php files. Most likely, your page files use these names so the update replaced your custom pages with empty files.

I'm having issues?

If you are experiencing issues with /pages/tos and /pages/privacy then keep reading, otherwise you aren't affected and you shouldn't mind about this as this was removed in v3.12.5. If you skip 3.12.4 then you shouldn't have issues either as the latest release is 3.12.5.

If you have issues

Unfortunately, this error can't be reverted. If you have a backup, simply re-upload the /content/pages folder and everything will work as expected.

A. Remove (or restore) both /content/pages/tos.php and /content/pages/privacy.php
B. If you don't have a backup you will need rebuild these pages. To make this process easier, you can rely on https://archive.org/web/ or even Google (for example, search for "https://demo.chevereto.com/page/tos" with quotes and then click on cache).

Note that you can navigate to /content/pages/default to get the base PHP for these pages (header and footer included).

I know that the process is awkward, sorry about that.

Cheers,
Rodolfo.
 

tomsit

Moderator & Chevereto freak
Community Staff
Joined
Nov 25, 2016
Messages
453
Likes
245
Points
125
Location
Norway
Website
freeimage.host
#2
Google cache did the trick for me. Easy fix :)
 

neoark

Network license
Beta tester
Joined
Feb 25, 2015
Messages
157
Likes
10
Points
68
#3
There seems to be another bug I can't add a page anymore no save button.

1544130606869.png
 

tomsit

Moderator & Chevereto freak
Community Staff
Joined
Nov 25, 2016
Messages
453
Likes
245
Points
125
Location
Norway
Website
freeimage.host
#4
I can reproduce this too.
 

Rodolfo

Chevereto Developer
Chevereto Staff
Joined
Oct 7, 2008
Messages
16,259
Likes
4,225
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
#5
Remove (or restore) both /content/pages/tos.php and /content/pages/privacy.php
 

Rodolfo

Chevereto Developer
Chevereto Staff
Joined
Oct 7, 2008
Messages
16,259
Likes
4,225
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
#7
I do have the button, most likely the page is being terminated by PHP. Since I can't reproduce it, I can't help unless you guys show me the source output.
 

bee

Well-Known Member
License owner
Joined
Dec 2, 2014
Messages
176
Likes
35
Points
78
Location
Thailand
Website
bee.creative.xxx
#8
  • bee

    bee

see screenshots
 

Attachments

tomsit

Moderator & Chevereto freak
Community Staff
Joined
Nov 25, 2016
Messages
453
Likes
245
Points
125
Location
Norway
Website
freeimage.host
#10
1544262170014.png
 

bee

Well-Known Member
License owner
Joined
Dec 2, 2014
Messages
176
Likes
35
Points
78
Location
Thailand
Website
bee.creative.xxx
#11
  • bee

    bee

Can't add the complete code (Oops! We ran into some problems. Please enter a message with no more than 20000 characters.)

Page is broken after "<div id="page-type-combo">"


Code:
 <h3>Add page</h3>
            
            
            <div class="input-label">
                <label for="page_title">Title</label>
                <div class="c9 phablet-c1"><input type="text" name="page_title" id="page_title" class="text-input" value="" required placeholder="Page title"></div>
                <div class="input-below input-warning red-warning"></div>
            </div>

            <div class="input-label">
                <label for="page_is_active">Page status</label>
                <div class="c5 phablet-c1"><select type="text" name="page_is_active" id="page_is_active" class="text-input">
                    <option value="1">Active page</option>
<option value="0" selected>Inactive page (404)</option>
                </select></div>
                <div class="input-below input-warning red-warning"></div>
                <div class="input-below">Only active pages will be accessible.</div>
            </div>

            <div class="input-label">
                <label for="page_type">Type</label>
                <div class="c5 phablet-c1"><select type="text" name="page_type" id="page_type" class="text-input"  data-combo="page-type-combo">
                    <option value="internal">Internal</option>
<option value="link">Link</option>
                </select></div>
                <div class="input-below input-warning red-warning"></div>
            </div>

            <div id="page-type-combo">
 

McAtze

Network license
Beta tester
Joined
Aug 21, 2015
Messages
71
Likes
21
Points
58
Website
pixxx.cloud
#12
The default pages are working for me, but i couldn't create a new page. The creating page is broken like explain above.

Screenshot 2018-12-08 12.57.05.png
 

Rodolfo

Chevereto Developer
Chevereto Staff
Joined
Oct 7, 2008
Messages
16,259
Likes
4,225
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
#13
Unless you give me the actual php error triggering the premature exit of the script I won't be able to help you guys.

Here is what is below <div id="page-type-combo">:

PHP:
            <div id="page-type-combo">

                <?php

                    $pagesAll = CHV\Page::getAll();
                        $internals = [
                            'tos' => _s('Terms of service'),
                            'privacy' => _s('Privacy'),
                            'contact' => _s('Contact')
                        ];
                        $printInternals = [
                            null => _s('Extra page'),
                        ];
                        $takenInternals = [];
                        foreach ($pagesAll as $k => $v) {
                            if ($v['internal'] && $internals[$v['internal']]) {
                                $takenInternals[] = $v['internal'];
                                if (get_page()['id'] == $v['id']) {
                                    $printInternals[$v['internal']] = $internals[$v['internal']];
                                }
                            }
                        }
                        foreach ($internals as $k => $v) {
                            if (in_array($k, $takenInternals) == false) {
                                $printInternals[$k] = $v;
                            }
                        }
                        $page_internal_combo_visible = get_settings_pages()['doing'] == 'edit' ? (get_page_val('page_type') == 'internal') : true; ?>
There must be something odd in that code, most likely in one of the foreach calls.

Unfortunately, I'm not getting any error and you have the thing just in front of you, only need to enable errors and tell me the exact error. Otherwise, I will have to try to discover the issue on my own which is only a big waste of time considering that by merely enabling error reporting you could point me in the right direction.

Edit: Ok, I was able to trigger it. Working on it.
 
Last edited:
Status
Not open for further replies.