ikkez / fabulog Goto Github PK
View Code? Open in Web Editor NEWthe new F3-powered awesome fabulous blog-ware
License: GNU General Public License v3.0
the new F3-powered awesome fabulous blog-ware
License: GNU General Public License v3.0
http://ikkez.de/fabulog/
Internal Server Error
Invalid query: unbalanced brackets found
Then in a black box in red writing (almost unreadable)
[fabulog/vendor/bcosca/fatfree-core/base.php:2178] Base->error()
[fabulog/vendor/ikkez/f3-cortex/lib/db/cortex.php:2481] trigger_error()
[fabulog/vendor/ikkez/f3-cortex/lib/db/cortex.php:2250] DB\CortexQueryParser->_mongo_parse_logical_op()
[fabulog/vendor/ikkez/f3-cortex/lib/db/cortex.php:751] DB\CortexQueryParser->prepareFilter()
[fabulog/vendor/ikkez/f3-cortex/lib/db/cortex.php:609] DB\Cortex->filteredFind()
[fabulog/vendor/ikkez/f3-cortex/lib/db/cortex.php:1718] DB\Cortex->find()
[fabulog/vendor/ikkez/f3-cortex/lib/db/cortex.php:619] DB\Cortex->get()
[fabulog/app/controller/tag.php:39] DB\Cortex->find()
[fabulog/app/controller/post.php:47] Controller\Tag->tagCloud()
[fabulog/vendor/bcosca/fatfree-core/base.php:1791] call_user_func_array()
[fabulog/vendor/bcosca/fatfree-core/base.php:1612] Base->call()
[fabulog/index.php:70] Base->run()
from admin/comment/edit/ID can't render the database
why for comments u use
$comment = new \Model\Comment();
if ($comment->addToPost($this->resource->_id)) {
and after in model use cortex foreach.
but in resource script u use cortex foreach from controller. what is the right way of editing db? with set_ in model or with side function in model that used by controller?
sorry for my english :)
I use your latest release
The project is not up to date, are you going to make a new update?
From your demo , when changing to postgres DB and then going 'home' it throws a query issue, missing group thingy. I will dl the blog and play with it, and might find a fix if you don't etc. but just thought I'd mention:
Internal Server Error
PDOStatement: ERROR: subquery uses ungrouped column "fblg_posts.id" from outer query LINE 1: ...ved" = $1 ) and ( "fblg_comments__count"."post" = "fblg_post... ^
[fabulog/vendor/bcosca/fatfree-core/base.php:2261] Base->error()
[fabulog/vendor/bcosca/fatfree-core/db/sql.php:235] user_error()
[fabulog/vendor/bcosca/fatfree-core/db/sql/mapper.php:376] DB\SQL->exec()
[fabulog/vendor/ikkez/f3-cortex/lib/db/cortex.php:892] DB\SQL\Mapper->count()
[fabulog/vendor/ikkez/f3-cortex/lib/db/cortex.php:1311] DB\Cortex->filteredFind()
[fabulog/vendor/bcosca/fatfree-core/db/cursor.php:150] DB\Cortex->count()
[fabulog/app/controller/post.php:53] DB\Cursor->paginate()
[fabulog/vendor/bcosca/fatfree-core/base.php:1873] Controller\Post->getList()
[fabulog/vendor/bcosca/fatfree-core/base.php:1673] Base->call()
[fabulog/index.php:71] Base->run()
(1.3ms) SELECT "id","username","name","password","mail" FROM "fblg_user" WHERE "id" = 1
(16.8ms) SELECT C.COLUMN_NAME AS field,C.DATA_TYPE AS type,C.COLUMN_DEFAULT AS defval,C.IS_NULLABLE AS nullable,T.CONSTRAINT_TYPE AS pkey FROM INFORMATION_SCHEMA.COLUMNS AS C LEFT OUTER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS K ON C.TABLE_NAME=K.TABLE_NAME AND C.COLUMN_NAME=K.COLUMN_NAME AND C.TABLE_SCHEMA=K.TABLE_SCHEMA AND C.TABLE_CATALOG=K.TABLE_CATALOG LEFT OUTER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS T ON K.TABLE_NAME=T.TABLE_NAME AND K.CONSTRAINT_NAME=T.CONSTRAINT_NAME AND K.TABLE_SCHEMA=T.TABLE_SCHEMA AND K.TABLE_CATALOG=T.TABLE_CATALOG WHERE C.TABLE_NAME='fblg_tags' AND C.TABLE_CATALOG='fatfree'
(1.7ms) SELECT "id","title","slug",((select count("fblg_posts__tags_mm_fblg_tags__post"."tags") from "fblg_posts__tags_mm_fblg_tags__post" LEFT JOIN "fblg_posts" ON "fblg_posts__tags_mm_fblg_tags__post"."post" = "fblg_posts"."id" where ("fblg_posts__tags_mm_fblg_tags__post"."tags" = "fblg_tags"."id") AND ("fblg_posts"."published" = true and "fblg_posts"."publish_date" <= '2022-08-19') group by "fblg_posts__tags_mm_fblg_tags__post"."tags")) AS "count_post" FROM "fblg_tags" WHERE 1=1 ORDER BY "count_post" DESC NULLS LAST
(0.6ms) SELECT ((select count("fblg_comments__count"."id") from "fblg_comments" AS "fblg_comments__count" where ( "fblg_comments__count"."approved" = 1 ) and ( "fblg_comments__count"."post" = "fblg_posts"."id" ) group by "fblg_comments__count"."post")) AS "count_comments",COUNT(*) AS "_rows" FROM "fblg_posts" WHERE "publish_date" <= '2022-08-19' and "published" = true
nabend ikkez,
bin durch zufall auf dein fabulog gekommen, echt schick, gute arbeit (:
hab leider beim testen folgendes gefunden:
mfg stefano
Hi,
I'm trying to develop a dropdown list of published pages when creating a new page. I just want to assign a parent page for each page. How can I show a list of all published pages excluding the current page and assign it to the current page(like an about us
, contact us
page under about
page)?
When I write this code it show error in page_edit.htm
Internal Server Error
Object of class Model\Page could not be converted to string
$parent = new \Model\Page();
$parent->filter('page',array('published = ? and publish_date <= ?', true, date('Y-m-d')));
$parent->countRel('page');
$this->response->data['parents'] = $parent->find(null,array('order'=>'title asc'));;
$f3->set('parents',$this->resource->exec("SELECT title FROM fblg_pages where id!='".$params['id']."' and published=1 order by title asc"));
When I tried this code
$f3->set('parents',$this->resource->exec("SELECT title FROM fblg_pages where id!='".$params['id']."' and published=1 order by title asc"));
It show me error- Fatal error: Call to undefined method Model\Page::exec()
How can I call exec in a controller?
When I tried to open an url which does not exists(e.g. http://localhost/fabulog-master/admin/page), it shows me following error
Fatal error: Call to a member function setView() on a non-object
[C:/xampp/htdocs/fabulog-master/app/controller/backend.php:19]
while it should show the user that page does not exists. Why you are showing programming error?
upload an image from admin/post have some error.
can't update image.
In order to learn Fat-Free-Framework, I decided to start tweaking Fabulog to add support for Pages (I can share my code when I am done)
Here is what I did:
1 ) Created a new model "Page", new Admin views "page-list.html", "page_edit.html", "page_layout.html", and a new controller "Page". Obviously, these are tweaked copies of your Post versions.
2 ) I added the Page section in the admin menu
3 ) I changed the routing at follows:
// view list
$f3->route(array(
'GET /',
'GET /page/@page'
),'Controller\Post->getList');
// view single
// pages have priority: if the slug isn't found in page, we will call Post->getsingle
$f3->route(array(
'GET /@slug',
'GET /p/@slug',
), 'Controller\Page->getSingle');
$f3->route(array(
'GET /post/@id'
), 'Controller\Post->getSingle');
4 ) In my page not found handling, I added this:
if ($this->resource->dry()){
if (!isset($params['id'])) {
$postcontroller= new Post();
$postcontroller->getSingle($f3, $params);
/*
$f3->route(array(
'GET /'. $params['slug'],
), 'Controller\Page->getSingle');
*/
}
else{
$f3->error(404, 'Page not found');
}
}
But neither methods work...
I instead get a page without the post loaded.
I can simply redirect to /post/@slug
But I was hoping to avoid doing that...
Do you have any ideas?
Here are my thoughts:
1 ) I do not yet fully understand the resource, so it's quite possible that the resource is still trying to work with pages.
2 ) Perhaps it's not possible to route or call a new controller from within a controller without extra initialization?
Hello,
it's not really a problem as everything works wonder, but I wonder why there is an echo in both the controllers->afterroute (which invokes view->render) and the views->render themselves (which return nothing, so the echo in the controller doesn't look useful).
The code does this:
in Controller->afterroute:
echo $this->response->render();
in View->render()
echo \Template::instance()->render($this->template);
(returns nothing)
Is this a safeguard for custom Views?
Best whishes.
I offer to add this functionality similar/related content by tags/keywords.
Do you plan to add multilanguage support (backend/frontend)?
Someone told me that forms should add token to avoid csrf attack. Then I read the fatfree documentation, the Session class has a csrf method to get the token.
But how to get the token?
`
$s = new Session();
echo $s->csrf(); //false returned
`
Then I look into fabulog to get help, I find that it doesn't check this.
Is csrf check needed?
Thanks.
When I tried to make page selected it show me error Object of class Model\Page could not be converted to int
This is code in page_edit.htm
<select name="parent_id" class="form-control">
<F3:repeat group="{{ @parents }}" value="{{ @item }}">
<option value="{{@item.id}}" {{(@item.id == @content.parent_id)?'selected':''}}>{{@item.title}}</option>
</F3:repeat>
</select>
and here is controller code
$this->response->data['content'] = $this->resource;
$this->response->data['parents'] = array(
array( "id"=>1, "title" => "About Us"),
array( "id"=>2, "title" => "Contact Us"),
);
Why there are no validation rules when creating/editing posts? When I tried to create a post without filling all mandatory fields it redirect me to 404 page not found. Instead of showing 404 you should show user some error message and show filled fields (what user filled in textbox). Its very annoying for a user.
The title and description in the header area are currently all identical, how do I make it to load from the variable value I set in each controller? I've tried to set the variable in each controller but the layout.html always loads first than the other page.
Hi There,
Currently your rewrite rule will turn my url www.mysite.com to mysite.com could you please tell me how to disable this?
I accidentally deleted admin user and now unable to log in admin panel. You should not allow to delete admin user.
PHP 7.2: session_cache_limiter(): Cannot change cache limiter when session is active
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.