Closed Darkseid1981 closed 1 year ago
It's very unlikely that this is related to the change you did :-) I'll check the problem tomorrow. Can you give more details about when it happens.
PS! There are probably many of these bugs, but I don't mind fixing them as we go along. Very few are using PivotX actively on PHP 8.
It started yesterday, and all I changed were lines 1616 and 1628 of forms.php and nothing else.
What you were doing? Editing something or viewing?
If you modified front_2.tpl
, you need to post it so I can reproduce the problem. I can only guess what the fix is:
On line 3467 of pivotx/modules/module_smarty.php
replace
if (count($subweblog['categories']) > 0) {
with
if (is_array($subweblog['categories']) && (count($subweblog['categories'])) > 0) {
No, I just edited forms.php, otherwise it would give me a blank page when I click on the edit button for the weblog. I downloaded the PivotX master but I would get blank page if I try to edit the weblog. This is an issue we already addressed and should be in the current PivotX master, unless I'm wrong.
Trying again ...
1) What action on the website did you do before the error appeared? 2) Did you test my suggestion?
I was working on my own template, but something seemed off, way off. As in none of the changes I made to my template were taking effect any more. Even after clearing the cache, it still had no effect. So I though, OK, let's see what happens if I switch templates and that's when I saw it. No footer on the two column template. It seem to work on Byethost, sort of, it has the footer but the side bar looks off. But I'm fine with that, it just need to work on xampp. I thought I messed up the DB so I cleared out the workbench folder and copied over fresh files from the PivotX master zip and found out that the forms.php was still unmodified, so I just went to the issue post with the fix and made the changes, and I could now make a new weblog or even edit it. I change the template from skinny to the two column template and it was still the same. I tried it with the RC2 zip, same issue.
I have know idea what I did, or if I did any thing to cause this. Unless it's my template that did this, but that might be unlikely, I think, take a look at it: flat.zip
I'm still figuring things out regarding templates. I can always wait with my template until we have debugged PivotX for PHP 8.
The only templates that don't produce any errors is bares_bones, mobile and the skinny templates. I also did a complete reinstall of xampp in the hopes that in might be xampp messing around, but I still have the same issue. The only other thing I can try is running fsck, it could be just a corrupt FS node causing this. Scanning and fixing it, then reinstalling pivotx, might solve the issue.
I saw the commit, now I feel like I have to apologize for the massive workload I inadvertently dumped on you. But I do understand that you made a promise to maintain PivotX. I still feel responsible. I guess if it wasn't me someone else would have found these bugs.
No worries, the clean-up was needed. Anyway, let us get back on topic:
PS! Upgrading to a new master version is very easy. Basically:
pivotx
to pivotx.old
.pivotx
folder is in the same directory as pivotx.old
- the same location as before.rm -rf pivotx/db
rm -rf pivotx/templates
mv pivotx.old/db pivotx/
mv pivotx.old/templates pivotx/
OK, I'll test it and let you know what happens. And those errors appeared while I was working on my template, on xampp.
And those errors appeared while I was working on my template, on xampp.
That still doesn't answer my question: "While editing your weblog or viewing it? What is the URL?" I assume it's while viewing the weblog. (By "Editing" I mean the administrativ / internal pages of PivotX.)
I honestly don't get it, it still doesn't render the two column and 3 column templates correctly. And I didn't edit them either. Here is the php_error_log php_error_log.txt
What we can do is use teamviewer or anydesk, so you can see what my xampp and pivotx config look like. I just don't get it, and I have no idea what could have changed to get this issue. It's giving me a migraine.
One thing I have to mention is that my template seems to be rendering correctly, for the moment. It's just the two and three column templates that are not rendering correctly. and if they're not rendering correctly then any of the features they use would have the same rendering errors if I were to try them in a template.
On a side note, where are all the other templates from pivotx.net? I'd like to have a look at there tpl files and see how others made their own templates, you know, learn by example.
I finally was able to reproduce it. My initial suggestion should have worked. Anyway, the fix I applied is found in this commit. I recommend grabbing the master.zip again.
The problem is caused by switching templates for existing weblogs. If the new template has more subweblogs, the new subweblog isn't correctly setup - missing all settings. (You need to add categories and then number of entries.)
I have saved all the themes for themes.pivotx.net (from archive.org actually) and will add them to GitHub later this week.
I closed the issue with a fix. Please don't waste my time answering prior questions now.
If the fix didn't work, reopen the issue with a new error report.
I don't know if I did something wrong or what but now I'm getting this, and the template are not rendering correctly.
PHP_error_log:
Not sure if I'm barking up the wrong tree, but this happened after I edited the form.php and changes the int + to intval() so I can make new weblogs and change the templates. Am I on to something?