Comments (6)
Looking further into this, I'm not sure if there is a bug or an issue with OSX and time conversions but var dumping the meta data is changing the date to 4 hours ahead (ex. 2017-07-21 20:03:44 vs db value of 2017-07-21 16:03:44). I tried changing time zones but it had no effect. I've been developing in Laravel but have little experience with Slim but will keep looking for an answer.
from leafpub.
Hi @robertem128 ,
thanks for posting.
Leafpub saves the local date in UTC format to the database (https://github.com/Leafpub/leafpub/blob/master/app/source/classes/Leafpub.php#L345)
and converts the database date, which is in UTC format, to local format
(https://github.com/Leafpub/leafpub/blob/master/app/source/classes/Leafpub.php#L830)
I tested a clean installation of Leafpub 1.1.9 and I was able to open an author post with an admin/editor user, so I can't reproduce this strange bug 🙁
On line 275 of AdminController, there's the check for owner/admin/editor
from leafpub.
Thanks @karsasmus,
I did see those but I think there is something else going on in my case. I had tried comment out the code in both functions before I posted with the same results. I have also verified my timezone settings in both PHP and the app. I'm going to try a fresh install on both my local and a DO LAMP and see if I can track it down what's happening. It's very possible that the problem is in my local setup but I have not seen this behavior on any of the apps that I have wrote.
from leafpub.
I was able to resolve the issue by changing the getPostMeta function on post.php. the problem I was experiencing was related to the time change in that the setting of the post meta 'lock' is not converting the time to UTC so the page was not accessible for 1 day + 4 hours (in my timezone).
I replaced
$time = strtotime($ret['lock'][1]);
with
$time = strtotime(Leafpub::utcToLocal($ret['lock'][1]));
and now everything works as expected.
Thanks,
Rob
from leafpub.
Thank you for finding and fixing the bug, @robertem128 👍
from leafpub.
Stupid question, but it appears this is commented out from post.php in the new version, presume this function is now obsolete, however, I still have issues where a draft can't be published and/or doesn't save after the 'first' save. I've written whole posts, hit save, and the progress bar/message doesn't display.
This is all within a few seconds, so should still be under same session.
from leafpub.
Related Issues (20)
- Slug for non english characters HOT 3
- Error 500 after update from 1.1.7 to 1.1.8 HOT 4
- Make languages installable
- Caption box on images prevents centre justify HOT 4
- Add external images to content HOT 1
- Donations via liberapay HOT 1
- Issue in 'Leafpub' installation (Version 1.1.9) while using Mysqli adapter HOT 7
- Noob question/issue - Login with https/ssl error HOT 10
- Stored Cross-site Scripting (XSS) HOT 3
- 1.20 b5/b6 - Link button kaput HOT 4
- Font Awesome Pro SVG Engine HOT 2
- Requesting Content over SSL behind Proxy HOT 4
- Docker HOT 1
- Header images not showing up when using the Range theme HOT 1
- Wrong link in the readme
- Website & documentation HOT 4
- Can't install Leafpub on /Public_html HOT 1
- Is project dead? HOT 1
- Leafpub looks terrific but new posts not displaying consistently HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leafpub.