Giter Site home page Giter Site logo

forkcms / forkcms Goto Github PK

View Code? Open in Web Editor NEW
1.2K 59.0 325.0 105.53 MB

Fork is an easy to use open source CMS using Symfony Components.

Home Page: http://www.fork-cms.com

License: MIT License

PHP 67.01% JavaScript 14.88% Smarty 0.12% CSS 0.47% HTML 0.11% Shell 0.02% Dockerfile 0.05% Twig 14.51% SCSS 2.84%
cms symfony fork fork-cms forkcms php doctrine hacktoberfest

forkcms's Introduction

Fork CMS

Build Status Latest Stable Version License Code Coverage Documentation Status huntr.dev | the place to protect open source

Installation

  1. Make sure you have composer installed.
  2. Run composer create-project forkcms/forkcms . in your document root.
  3. Browse to your website
  4. Follow the steps on-screen
  5. Have fun!

Dependencies

Remark: If you are using GIT instead of composer create-project or the zip-file from http://www.fork-cms.com, you should install our dependencies. The dependencies are handled by composer

To install the dependencies, you can run the command below in the document-root:

composer install -o

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker. HTML is allowed in translations because you sometimes need it. Any reports regarding this will not be accepted as a security issue. Owners of a website can narrow down who can add/edit translation strings using the group permissions.

Bugs

If you encounter any bugs, please create an issue on Github. If you're stuck or would like to discuss Fork CMS: Join our Slack channel Join our Slack Channel!

Running the tests

We use phpunit as a test framework. It's installed when using composer install. To be able to run them, make sure you have a database with the same credentials as your normal database and with the name suffixed with _test.

Because we support multiple php versions it gave some issues. Therefore we use the bridge from symfony.

Running the tests:

composer test

Running only the unit, functional, or the installer tests

 composer test -- --testsuite=functional
 composer test -- --testsuite=unit
 composer test -- --testsuite=installer

If you want to run all the tests except the ones from the installer use

composer test -- --exclude-group=installer

Styling the backend

The backend uses Bootstrap in combination with Sass. To make changes, you should make the changes into the scss-files, and regenerate the real css with gulp build.

Yarn

We use yarn to install our dependencies. For now we have a gulp-script that moves everything to the correct directories. So if you change the dependencies, make sure you run gulp build.

Community

Join our Slack channel Join our Slack Channel!

The Fork CMS team

forkcms's People

Contributors

annelyze avatar bart-webleads avatar bjorvack avatar blackfrost79 avatar carakas avatar cirykpopeye avatar davelens avatar decthomas avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dieterve avatar dofken avatar freshface avatar ghazitriki avatar jelmersnoeck avatar jeroendesloovere avatar jessedobbelaere avatar jonasdekeukelaere avatar katrienvh avatar lowiebenoot avatar matthiasmullie avatar stijnvrolijk avatar thijzer avatar tijsverkoyen avatar vytsci avatar wolfr avatar woutersioen avatar wouterverstuyf avatar yoniweb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forkcms's Issues

Analytics render issues

I've updated my website to Fork 3.5 and I noticed some render issues with the Analytics module. As you can see in the screenshot, the pie chart isn't fully rendered. The charts also don't have animations anymore.

I've recreated the problem with a new installation, but I got the same result.

Image 2013 03 28 00-57-59

EDIT:
I just solved my problem by upgrading highcharts.js from v2.3.3 to the latest version v3.0.0. It works like a charm now.

Let email module support live.com via encrypted protocol SSL/TLS

Transferred from Lighthouse bugtracker: 338

December 18th, 2012 @ 08:47 AM:
Because Microsoft provides free domain email which is safer than mine, I decided to use this service. However, I meet some problems, and I solved them. I hope it will be helpful.

First, Live only allow us to use SSL/TLS to connect its SMTP server, but the FORK-CMS doesn't use encrypted SMTP, so i have to made some changes to adapt LIVE Service.

  • modify [bug] library/spoon/email/smtp.php [233]
    HTTP_HOST=>SERVER_NAME (this is a spoon library bug, HTTP_POST means address:port, and because LIVE SMTP doesn't support the address which followed by ':port', so I have to modify it into SERVER_NAME ,which will only return the address.) I may submit the bug to spoon library later.
  • use phpmyadmin to add a record in modules_settings table : core, smtp_secure_layer, s:4:"smtp"
  • add in /backend/modules/settings/action/email.php [74]
$this->frm->addDropdown('smtp_secure_layer',array('no' => 'no','ssl' => 'ssl','tls' => 'tls'),

BackendModel::getModuleSetting('core','smtp_secure_layer','no'));
  • add in [137]
BackendModel::setModuleSetting('core', 'smtp_secure_layer', $this->frm->getField('smtp_secure_layer')->getValue());
  • add in /backend/modules/settings/ajax/testemailconnection.php [40]
$secure_layer = SpoonFilter::getPostValue('smtp_secure_layer',null,'');

if($secure_layer === 'ssl' or $secure_layer === 'tls')
$email->setSMTPSecurity($secure_layer);
  • add frontend/core/engine/mailer.php [270]
$secure_layer = FrontendModel::getModuleSetting('core','smtp_secure_layer');

if($secure_layer === 'ssl' or $secure_layer === 'tls')
$email->setSMTPSecurity($secure_layer);
  • add in backend/modules/settings/layout/templates/email.tpl [85]
<p>
   <label for="smtpSecureLayer">{$lblSmtpSecureLayer|ucfirst}</label>
   {$ddmSmtpSecureLayer} 
</p>
  • add translation via controlpanel SmtpSecureLayer => Secure Type

Bug for Groups > Dashboard widgets: duplicate names get handled as one

Problem

Dashboards widgets with the same widget name get handled as the same widget, instead of separate widgets.

How to replicate

Check image in attachment: can't select + save only 1 item called 'comments'.
Which are included in multiple modules.
Bug: After selecting 1 comment widget of the two, they both get saved as selected.

Schermafbeelding 2013-04-03 om 13 41 48

Possible solution

  • Adding the module to the key

Minifier doesn't allow double backslash

Transferred from Lighthouse bugtracker: 348
Was reported through the forum

February 12, 2013 @ 02:01 PM:
The bug come from the line 308 of the original response theme. .iconic.map-pin:before { content: ""; } If i replace the double backslash with anything else it's fixed. I dont have time to investigate further more but when minified, this line really break the template in old webkit based browsers.

Backed login error

When providing a faulty e-mail address there's an exception thrown. Providing the right email address with a faulty password the proper errormessage is displayed.

Debug mode

People are unable to enable or disable the debug mode. The notice in the backend stays set.

CSSToInlineStylesException on Contact Form

Visitors can't use the contact form anymore (it worked before).

This is part of the error trace:

CSSToInlineStylesException » Main

Message No HTML provided.
File /home/ts001/domains/xxxxxxx/public_html/library/external/css_to_inline_styles.php
Line 221
Date Tue, 21 May 2013 09:15:26 +0000
URL http://www.xxxxxx
Referring URL http://www.xxxxxx
Request Method POST
User-agent Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 3.0.4506.2152)
PHP error chmod() [function.chmod]: No such file or directory

BUG: Blog post > Can't use older archived URL, even if it is for same post.

When adding adding a blog post with an URL "ABCD", and afterwards you changed the URL to "DCBA".
Then you can't return the URL to "ABCD", you get the "URL already exists" error.

This is a bug, because you should be able to use that URL "ABCD" back again, because that URL is used for that same post, just an older version.

Replace SpoonHTTP with HTTPFoundation

To be able to replace all usages of SpoonHTTP, we need to be able to access the Response or Request object from almost anywhere inside Fork. Every time we set headers or setcookies, we should be able to access the Response. Every time we need to use a global (get/post/...), we need to be able to to access Request.

I do not have a clean solution for this. Fork accesses global variables from anywhere and sets headers/cookies from anywhere. We should try to minimize this as much as possible but I am afraid that with our current core it will not be possible.

Spoon: Assigning an array gives php notice

Transferred from Lighthouse bugtracker: 344
Was reported through the forum

January 24th, 2013 @ 11:30 AM:
Hi!

When trying to enter the Module Settings in the backend, I do recieve an error message:

Notice: Array to string conversion in /homepages/32/d40870762/htdocs/library/spoon/template/template.php on line 127
Internal error

I recieve the same error message, when i want to enter the commentaries in the blog module in the backend.


January 25th, 2013 @ 11:25 AM:
Probably a "module setting" that does not (yet) exists in database and has been incorrectly set in the BackendModel::getModuleSetting('module', 'name', ***);

Solution:
Replace the *** by your default that matches the required type (string, array, int, ...)

Example:
For dropdown:
BackendModel::getModuleSetting('module', 'name', array());
For textfield:
BackendModel::getModuleSetting('module', 'name', '');

Solution in module:
Set the correct module setting in the installer.php
public function install() { $this->setSetting('projects', 'show_file_form', false); }


January 25th, 2013 @ 12:30 PM:
Which version of PHP are you using?

Search widget, results show htmlentities

Transferred from Lighthouse bugtracker: 346

January 25th, 2013 @ 11:16 AM:
When searching for a word on the search page, the results show htmlentities.

F.e.: "& nbsp;" shown instead of a normal space...

The "& nbsp;" was probably there by copy/pasting. But nonetheless it needs to be fixed somehow.

Same problem as ticket 184

schermafbeelding-2013-01-25-om

Use relative paths or include other parameters within parameters in yaml file

It should be handy if the site.path_www and site.path_library was relative instead of absolute.
Is it necessary to have these parameters as absolute paths?

I had 2 options to handle this:
1.
site.path: ./library
and convert the value in defineForkConstants in app/AppKernel.php to its full path.

site.path: %kernel.root_dir%/library
and let the container handle the conversion like in Symfony
For this, the kernel.root_dir has to be set in getKernelParameters in app/Kernel.php
Only thing is, when calling defineForkConstants, the container isn't compiled yet and the string is not converted.
When you manually compile the container builder, the ParametersBag will be frozen and can't be accessed any more, what is not an option at this position.

Any thoughts about a proper solution for this?

special character escaping in parameters.yml by installer

The installer will fill the parameters in step 7 in the parameters.yml file, but @actiongroup should be escaped as @@actiongroup

If the getConfigurationVariables will only by used for this it could be changed at https://github.com/forkcms/forkcms/blob/master/install/engine/step_7.php#L282 to @@actiongroup

Otherwise, all special characters in the variables should be escaped here: https://github.com/forkcms/forkcms/blob/master/install/engine/step_7.php#L107

Register SwiftMailer as a service

Register the SwiftMailer as a service so it can be used throughout Fork.

Todo:

  • Register swiftMailer as as service
  • Extend Swift_Message with some fork specific functionality and dependency injection (f.e. Fork_Message)
  • Fork_Message: template parsen, talen automatisch assignen
  • Logging with monolog
  • Deprecate commonMailer
  • Refactor usages of CommonMailer

PDOException when submitting the contact form after clean install

After a clean install of Fork when going to the Contact page and submitting the contact form, I get a PDOException concerning the "plain_text" field of the "emails" table in the database:

Message SQLSTATE[HY000]: General error: 1364 Field 'plain_text' doesn't have a default value
File    /Users/gertjanmeire/Sites/forkcmstest.dev/vendor/spoon/library/spoon/database/database.php
Line    884
Date    Tue, 26 Mar 2013 14:30:57 +0100
URL http://forkcmstest.dev/en/contact
Referring URL   http://forkcmstest.dev/en/contact
Request Method  POST
User-agent  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22

When changing the "plain_text" field in the "emails" table to Allow Null it works, but I don't think this is good idea since sending only HTML mails is not enough...?

Analytics module imports incorrect profile names

After entering the GA API key, you get to select the correct profile from which the analytics data is retreived.
In my GA login I have a number of accounts (=containers,companies) configured, which all contain one or more properties (=websites), which contain one or more profiles:

  • Company X
    • Website X
      • Development
      • Production
    • Website Y
      • Default profile
  • Company Z
    • Website Z
      • Development
      • Production

At this moment the selectbox shows the profiles grouped by the profile name:

  • Development
    • GA profile Development
    • GA profile Development
  • Default profile
    • GA profile Default profile
  • Production
    • GA profile Production
    • GA profile Production

Can you adjust the selectbox so it shows all profiles grouped by their property (=website)?

  • Website X
    • Development
    • Production
  • Website Y
    • Default
  • Website Z
    • Development
    • Production

Thank you

Editor uses currentWorkingLanguage instead of currentInterfaceLanguage

Transferred from Lighthouse bugtracker: 322

September 27th, 2012 @ 04:27 PM:
The editor uses the currentWorkingLanguage.
But is has to use the currentInterfaceLanguage.

September 27th, 2012 @ 04:29 PM:
The buttons use the wrong translations. The dropdowns use the correct working locales...

September 27th, 2012 @ 04:40 PM:
Possible solution could be:
In jsBackend.js, use the cookie value of "interface_language" instead of jsBackend.current.language

October 1st, 2012 @ 03:04 PM:
Previous possible solution won't work, because utils.cookie not exists at that time.

Main Layout template change actionside

My guess this is some kind of architectural glitch. Maybe i just didn't find a solution. But there is no way to change main layout of the page. What i mean is that there is module templates and i can change these in my module action, but i didn't see any way to change layout template, for example.: login.tpl -> default.tpl (These ar main theme layout templates). The only annoying thing i found.
I found a solution, but i needed to edit FrontendPage class, just added two methods setTemplatePath(){} and getTemplatePath(){}, and later i can change it with Spoon::get('page')->setTemplatePath(PATH_OF_MY_TEMPLATE);
Maybe this is not proper solution, but this is very useful in many situations especially when we have to switch between users and users have totally different interfaces.

Page title is stored as htmlentities escaped string in database

  • Version: 3.4.4
  • I made a page with title: Video's "á la carte"
  • This is stored in mysql as: Video&#039;s &quot;á la carte&quot;
  • You should never stored escaped data in mysql but only escape at the latest moment (e.g. $var|htmlentities in the the page template)
  • For example, I am currently writing a module which allows you to fetch some page info over ajax and have to manually unescape pages['title']

non-www to www-redirect causes error in Analytics connection

For a project, i've activated the 'one url to rule them all' code in the .htaccess file.

When I want to see the Google Analytics numbers, the loader keeps showing. First I've deleted the connection between the project and the GA account, but when I want to reconnect, I get an error message.

I've commented the 'one url to rule them all' code and tried everything again, and it all works... Looks like the connection between the project and GA works with the non-www url..

Cronjob error

Since upgrading to Fork 3.5 i keep receiving mails that cronjobs fail. When trying them manually I get the error "module not allowed". Diewy asked to report this issue so here it is ;)

Editor templates.js: themefolder integration

Their should be a solution where you can define that it has to use the themefolder where it is in.
Current code:

[
    {
        "title": "2 columns",
        "description": "Content divided in 2 columns",
        "image": "/frontend/themes/themeName/core/layout/editor_templates/images/2_columns.png",
        "file": "/frontend/themes/themeName/core/layout/editor_templates/2_columns.html"
    }
]

Can't "themeName" be "{$THEME_FOLDER}", where THEME_FOLDER is the folder where this file is located in.
Like this:

"file": "{$THEME_FOLDER}/core/layout/editor_templates/2_columns.html",

Formbuilder - checkbox bug

Transferred from Lighthouse bugtracker: 349

February 20th, 2013 @ 11:32 AM:
I've encountered a bug when setting up a form with the Formbuilder module.

If you make a checkbox and give it one value with a ' in it, you can't set it up as a required field. When the form is posted, it automatically unchecks the box and displays the error message 'required field'.

So for example, when someone needs to accept the general conditions when entering a competition, it reads (in French):

"J'accepte les conditions générales."

Due to the ' in j'accepte the form can never be submitted.

Mailmotor: Couldn't find mailmotor.php in library

When subscribing to a newsletter in 3.5, the following error occurs:

Warning: require_once(external/campaignmonitor.php) [function.require-once]: failed to open stream: No such file or directory in /home/diewy/public_html/dpvtest/frontend/modules/mailmotor/engine/helper.php on line 81

Fatal error: require_once() [function.require]: Failed opening required 'external/campaignmonitor.php' (include_path='/home/diewy/public_html/dpvtest/vendor/spoon/library:.:/usr/lib/php:/usr/local/lib/php') in /home/diewy/public_html/dpvtest/frontend/modules/mailmotor/engine/helper.php on line 81

Although... the campaignmonitor.php file is uploaded

Schermafbeelding 2013-03-13 om 13 53 23

Triton, blog detail

On the bottom of the blog detail page is a white area under the footer in 3.5.0, probably caused by the share functionality.

Core: bug when URL has point at the end

Description:
page/post-URL that contains point (.) at the end of the URL.

Problem:
When sharing this URL on Twitter and then clicking that URL, it will open the URL, but without the point at the end. Result: 404 page shown.

Solution:
We should protect (unknowing) users and remove points at end of URLs.

Example:
Posting "http://demo.fork-cms.com/en/blog/detail/nunc-sediam-est." @ twitter will result in a 404 when clicking it.

Headers were already sent exceptions

Since I upgraded to Fork CMS 3.5 (I did a fresh install), I noticed that I got a lot of Headers were already sent exceptions. In the last two days I got almost 10 e-mails sent by Fork with exceptions. The website is still working perfectly (with debug = off) but I keep getting exception mails. John also got this error when he upgraded to Fork 3.5.

I got these 2 exceptions this morning at 06:03:
http://i.imgur.com/qppsnie.jpg
http://i.imgur.com/aLF17BY.jpg

And this afternoon I was making a new blogpost when I received another 4 e-mails:
http://i.imgur.com/6arUNmu.jpg
http://i.imgur.com/zgw7jKM.jpg
... And so on

Universal analytics

Is Universal Analytics integrated in the next release or will it need large adjustment in the backend?

getDB() needs to be replaced in extensions model

Fatal error: Call to undefined method BackendModel::getDB() in /home/diewy/public_html/dpvtest/backend/modules/extensions/engine/model.php on line 973

getDB() needs to be replaced in extensions model

Module action detection fix

I think getUrlForBlock should start check from sub tree where current page actually is rather than top of whole navigation tree. If block is not found in sub tree then block should be searched in whole navigation. This useful when module action is used several times in navigation in different sub trees, for example .: i have tree
Home
User type 1
Some page 1
Some page 2
My module
User type 2
Some page 3
Some page 4
My module

User type has different interfaces, and for example i want to reach User Type 2/my module from Some page 3, but it gives me User type 1/My module. As soon as i find a solution i will post it here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.