octobercms / october Goto Github PK
View Code? Open in Web Editor NEWSelf-hosted CMS platform based on the Laravel PHP Framework.
Home Page: https://octobercms.com/
License: Other
Self-hosted CMS platform based on the Laravel PHP Framework.
Home Page: https://octobercms.com/
License: Other
If I go to /plugins I get the following error:
An exception has been thrown during the rendering of a template ("The component 'demoTodo' is not found.").
C:\xampPHP54\htdocs\octobercms/themes/demo/pages/plugins.htm line 12
Latest update as of today (I think it was 11). Using windows 7 xampp 1.8.2
Implement a field type called dropdown in the Inspector editor.
Currently required for the Dashboard Widget width property.
It is unnatural to set the current pagination page by using:
App::make('paginator')->setCurrentPage(2);
We should include this as part of the ->paginate()
method in the Model. Eg:
$model->paginate(<records per page>, <current page>, [...]);
When trying to rename an asset in the CMS module, the following message is displayed:
Path can contain only digits, Latin letters, spaces and the following symbols: ._-/
This issue is probably caused by a merge of different JavaScript objects using jQuery's $.extend()
function. When comparing the objects before and after merging, it seems that data.renamePath
disappeared after the merge, which is the value used by the onLoadRenamePopup()
to determine the current path.
Possible Solution
To fix this issue, change /modules/system/assets/js/framework.js
(line 259) to:
var options = $.extend(true, {}, Request.DEFAULTS, data, typeof option == 'object' && option)
jQuery's $.extend()
only merges at the top level, discarding values as soon as another object contains the same top level object. Enable merging at the second level by passing true
as first argument to $.extend()
.
When uploading an avatar on the administrators settings page, and the GD library extension is not loaded, the (cryptical) message Error uploading file: Internal Server Error
is shown. When saving the settings, it won't be possible to access the settings page again (see screenshot), until the file is removed from the system_files
database table. (This issue will also affect other modules that allow image uploading, like Rainlab.Blog
)
Possible solutions
Throw an exception when trying to upload an image file without GD enabled, by modifying checkUploadPostback()
(modules/backend/formwidgets/FileUpload.php
):
if ($isImage)
{
$validationRules[] = 'mimes:jpg,jpeg,bmp,png';
if (!function_exists('gd_info'))
throw new SystemException('Uploading images is only possible with the GD library installed');
}
Add the GD library to the system requirements check during install
(function_exists('gd_info')
or extension_loaded('gd')
)
When I type / into the search query in the pages list, I'm more often than not looking for the index page. I'd like exact match query results to appear before other results when searching.
I sometimes don't know what the index page's title is, so using the slug is the best option.
For some reason the page appears blank if the {% put %}
tag appears below the page content.
<h1>I am content!</h1>
{% put scripts %}
<script>
...
</script>
{% endput %}
The H1 tag never appears on the page.
Front-end AJAX requests by default do not display any sort of load indicator. Since there is no easy way to emulate the browsers loading behavior, there should be a generic AJAX loader available to the front-end.
This should be bundled with the framework using an additional token value:
{% framework extras %}
The additional extras part will include some desirable extras a developer may want, but not need in all cases. The AJAX loader is the only extra that qualifies for this currently.
Once included, all AJAX requests will display a loading indicator similar to the back-end stripe loader.
When creating a new empty content block or asset via the CMS module, the message Error saving file "test-content.htm"
is being displayed. However, the file is still being created.
This is possibly being caused by the save()
function in /modules/cms/classes/CmsObject.php
(line 335), which will only check the value and not the variable type:
if (@file_put_contents($fullPath, $this->content) == false)
file_put_contents()
returns a false
or the file size, so a return value of 0
as well as false
will match.
Possible solutions
if (@file_put_contents($fullPath, $this->content) === false)
Is alpha only accepts root user for SQL? I've installed it on my cPanel, entered all details, installation done. But when I log in to backend it says SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) and SQL structure is empty.
Twitter Settings page just includes 4 fields for the various api auth details, no instructions for how to obtain those details.
Components and plugins may wish to provide front-end assets (JavaScript, StyleSheet files). There should be a standard method to inject these in to front-end pages.
This can be achieved with an optional placeholder tag for each:
<head>
{% styles %}
</head>
<body>
<!-- Content -->
{% scripts %}
</body>
Create the token parsers for each, along with an approach to extend the Cms Controller class.
Prototype code:
Cms\Classes\Controller::extend(function($controller) {
$controller->addJs('/path/to/script.js');
$controller->addCss('/path/to/style.css');
});
The Backend Controller currently uses an AssetMaker trait which may be a candidate for this. If so it should be moved to the System module.
As per docs:
Default relationship filters can be used on all relations:
public $belongsToMany = [
'categories' => ['Category', 'order' => 'name desc', 'conditions' => 'active = 1']
];
When modifying a layout via the CMS module, changes are only displayed after the cache is cleared (or cache expires). Issue verified with file
and memcached
driver.
Possible solution
Clear cache after a layout modification: Cache::flush()
It seems that using Mail::send() does not utilize system mail settings, but rather app mail config.
It should likely be: if mail settings is not present then use app mail config settings.
With the introduction of Laravel 4.1 there is a new hasManyThrough
relationship definition. This should be ported to October's ActiveRecord model.
Prototype code:
// Country
protected $hasManyThrough = [
'posts' => ['Post', 'through'=> 'User', 'foriegnKey' => 'country_id', 'throughKey' => 'user_id']
];
Whilst there, during the upgrade there were some additional parameters made available (localKey) that should also be added to the exisiting relationship accepted parameters.
Using the CMS module, the page title (<title>bla</title>
) only changes when loading a fresh page/partial/layout/etc. When clicking one of the already opened tabs in the CMS navigation, the page title doesn't change.
It looks like the page title is only set when loading AJAX content (via handleUpdateResponse()
in modules/system/assets/js/framework.js
).
Possible solution
Change the page title when a tab is shown, by adding something like $('title').html($(event.target).attr('title'));
to the modules/cms/assets/js/october.cmspage.js
file (inside the shown.bs.tab
trigger). Undo the changing combined with the AJAX call.
A Filter behavior will modify the controller to allow a dataset to be filtered, for example, the dataset used by a List behavior. If the list records were blog posts:
These filters can be registered as classes which contain the filtering logic against the model query object.
Filter scenarios:
Proposal for a helper function in components called propertyOrParam() which returns the property value or the router parameter if the first argument starts with a colon (:)
$this->property('id') + $this->param('id') = $this->propertyOrParam('id')
Hard coded (property value) example:
title = "Hard coded to display Blog Post with ID of 2"
url = "/a-hard-coded-page"
[blogPost]
id = "2"
==
{% component 'blogPost' %}
Dynamic (routing parameter value) example:
title = "Display Blog Post with ID set in my_custom_parameter"
url = "/a-dynamic-page/:my_custom_parameter"
[blogPost]
id = ":my_custom_parameter"
==
{% component 'blogPost' %}
In both examples, the value can be accessed in the component via
$this->propertyOrParam('id')
When working in the file system and the October GUI simultaneously, the GUI will lose sync with the file system. The current solution is to refresh the CMS page and the changes will be picked up.
Perhaps if we implement a Cmd/Ctrl+click event. Example:
Pages are published by default, meaning anyone can access them.
I propose a hidden flag to allow developers to make unfinished pages unavailable.
Prototype code:
title = "Forum"
url = "/forum"
layout = "default"
hidden = true
==
<h1>Forum</h1>
...
This would also include the addition of a checkbox in the back-end.
The current solution (#41) is a bit flakey. After some careful consideration, the following approach should be used instead.
Components can reference their partials in two ways. First is an explicit method:
{% partial __SELF__ ~ "::title" %}
The second is a relaxed method:
{% partial "@title" %}
The relaxed method is contextual:
All component partials can be overridden using the theme partials. Following from the previous example, if our component called channel uses the title.htm partial.
url = "mypage"
[channel]
==
{% component "channel" %}
We can override the partial by creating a file in our theme called partials/channel/title.htm.
The file path is broken down like this:
We can choose our own name for the partial subdirectory by giving the component a different alias. For example:
[channel foobar]
==
{% component "foobar" %}
Now we can override the partial by creating a file in our theme called partials/foobar/title.htm.
As @daftspunk found out today, there are some issues with the UI when those (new) touch events in Chrome are enabled. That means, that I am not able to see any of the "popups" on tab "CMS".
However, I found a way to disable the touch events:
1.) Open "chrome://flags/" in browser
2.) Search for "touch events" (or similar, I use a german language pack)
3.) Disbable the found option (default is auto)
Some changes to the SEO tab of a page are needed.
Title - 60 characters
Description - 160 characters
As per specs:
Meta Description: Meta descriptions can be any length, but search engines generally truncate snippets longer than 160 characters. It is best to keep meta descriptions between 150 and 160 characters.
source: http://moz.com/learn/seo/meta-description
Title Tag: Search engines will truncate titles in search results that exceed a certain length. For Google, this length is usually between 50-60 characters, or 512 pixels wide
How to replicate:
If creating a blog post and you let it "autoset" (ie, you don't specify anything manually) the published on date. It auto filled in "1999-12-31 18:00:00". This is obviously the wrong date.
When performing a system update, if there are no plugins installed, the process will fail.
When on a preview form, the checkbox field retains its click functionality.
The functionality should be disabled as it is a preview only.
The entrance backend forms require a style update to match the remaining application. Forms:
A core function of October, interconnected plugins should define their relationships to each other called "required dependencies".
The dependant plugin will require its dependency or dependencies (required plugins). This definition will produce some outcomes:
$require
property values should support @1.0.1
suffix to indicate the minimum version required.Core
is needed to signify a minimum core build. eg: Core@154
requires core build 154 or later.$implement
definition for behavior usage, the definition can be stored in the $require
property, found in the Plugin registration file. The prototype code can look like this:public $require = [
'October.Blog',
'[email protected]'
];
Prompt messages:
October.Blog requires October.Demo to be installed, click OK to install it.
[ Ok | Cancel ]
October.Blog requires some other plugins to operate:
* Acme.XXX ($9.99)
* Acme.YYY ($4.99)
Consider purchasing the required plugins before using this plugin.
[ Ok ]
I'm willing to implement throttling by delay instead of IP.
Currently it is by IP which is fairly easy to fake.
https://github.com/octobercms/library/blob/master/src/Auth/Manager.php#L192
I would suggest that instead a delay be used.
http://blog.codinghorror.com/dictionary-attacks-101/
If desired, I'll code it up in a pull request.
When there is a number 1 in a red box next to the Pages entry. It may confusing what it does or how to remove it. It has no tooltip or way of dismissing.
There should be a tool tip to indicate this is # of unsaved items.
Some components will likely always need a rout.
We need a way to automate the appended :paramId
For flexibility, it may be preferable to only append the param on initial addition of the component so that page routs can still be modified and/or added to.
But it's also likely a way should be defined to allow a permanent requirement.
Seriously.
on and on and on....
Some Plugins can have many interconnecting partial references. This can become an issue when a theme wants to change a single partial in a component. At the moment the plugin's entire partial structure must be rebuilt in the theme up until the point the partial is used.
Let's take the Plugin called Forum for example, with a component named Channel, it has these partials:
default.htm
pagination.htm
topics.htm
title.htm
And look at the code inside default.htm
:
<div class="rainlab-forum">
{% partial __SELF__ ~ "::title" %}
{% partial __SELF__ ~ "::topics" %}
{% partial __SELF__ ~ "::pagination" %}
</div>
Let's say a user wants to override the title partial only. As a component developer, I can predict this and make room for it. If I change the partial code to this:
{% partial "title" %}
By using this code instead, we will say:
There is one problem with this scenario, the name "title" is too generic. It should be called "forum_channel_title" instead, but let's ignore that and keep it simple for now.
But what if we don't want the partial to overriden by the theme, I like the idea of using short partial names. This can be possible by forcing the CMS to look at Components first, not the Theme.
{% partial @"pagination" %}
The @
symbol is responsible for this here. It will translate to ::pagination
, when the component name is missing like this, all available components will be scanned. This is a "relaxed" approach.
However, to avoid conflicts with other components, a strict approach can be used, like so:
{% partial __SELF__ ~ "::pagination" %}
This is not as pretty, but it explicitly defines the component alias and will eliminate the possibility of another component used on a page or layout that also has a partial called pagination.
Extending concept one, it can still be possible to override a component on the basis of it's alias.
Take this page code for example, the same component is used twice, with a separate alias, and separate config.
[channel myChannel1]
...
[channel myChannel2]
...
==
{% component 'myChannel1' %}
{% component 'myChannel2' %}
This is how we can override title.htm in this scenario, inside the theme /partials folder:
We can cherry pick the partial, based on the alias given to the component.
If you change the admin password and hit save, it looks like you can still use the page, so try changing the avatar and you get javascript "forbidden" message.
Changing admin details should log you out and redirect to login page, or auto log you in with new details
When installing and immediate update is possible because the build number is not recorded.
Related issue:
rainlab/mailchimp-plugin#1
In the same family as hashable, purgeable and jsonable; another type is needed for storing sensitive data in the database encrypted
.
This should be added to October's ActiveRecord model.
class User extends \October\Rain\Database\Model
{
protected $hashable = ['password'];
protected $purgeable = ['password_confirmation'];
protected $jsonable = ['permissions'];
protected $encrypted = ['api_key']; // <== New
}
When clicking the close link on an edited Layout tab, a popup asking to discard changes appears twice.
How to replicate:
When putting October into a subdirectory, it only works when adding the trailing slash to the URL (http://localhost/october/). The URL without trailing slash (http://localhost/october) will display a 403 error or the directory listing.
To fix this issue, add the following to the .htaccess file:
RewriteOptions AllowNoSlash
Info: https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions
When installing to a subdirectory, a RewriteBase
should also be set in the .htaccess. It would be great if this could be automated during the install (since it's one of my most heard questions when installing a CMS), but this might as well be just a little note in the installation doc.
Problem: There's not currently a way to "dupe" a component or it's settings. There will most definitely be a need for this.
Users will want a way to reuse a component with all of the exact same settings.
Example:
Possible Solutions:
At the moment when there are no new updates, the Force Update button does not work as expected.
Clicking Force update should trigger a complete update of the system and the plugins currently installed.
Implement a field type called page in the Inspector editor.
Currently required for many components that define redirection pages and for creating relationships between components.
Simply the page picker will allow the selection of a page in the current theme, the returning result will be the page file name (without extension) as used in the page filter.
{{ 'folder/filename'|page }}
There should be an interface for placing the website in Maintenance mode. The UI should specify a page name, this page will be shown to the front-end user when the site is in Maintenance mode.
If the user is currently logged in to the back-end as an Administrator, the Maintenance mode flag will not affect them. They should still be able to freely navigate the website.
Extend the cache:clear artisan command to also cleanDirectory()
the introduced storage folders.
php artisan cache:clear
Should also clear these introduced storage folders:
If I go to CMS, assets, and click on any of the items in the list. I get the following error:
"Path can contain only digits, Latin letters, spaces and the followign symboles: ._-/"
It pops up as a browser alert (little popup window that doen't let you do anything in the browser till you hit "ok"
Latest update as of today (I think it was 11). Using windows 7 xampp 1.8.2
How to replicate
1.Install Rainlab User Management plugin
2.Click System
3.Click Users > Location
4.Profit
Refer to the question mark (?) located in the top right of the backend interface.
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.