Coder Social home page Coder Social logo

zikula / core Goto Github PK

View Code? Open in Web Editor NEW
237.0 37.0 68.0 82.28 MB

Zikula Core Framework

License: GNU Lesser General Public License v3.0

PHP 27.72% CSS 2.03% JavaScript 62.04% Twig 8.17% Shell 0.04%
zikula symfony php twig framework doctrine bootstrap symfony-application

core's Introduction

Build status StyleCI Scrutinizer

Zikula Core - Application Framework

Zikula Core is an Application Framework which extends Symfony 7.x and includes technologies fostering a dynamic modular development paradigm which allows for rapid application development. See the features list for more information.

Zikula also features an MDSD tool for rapid prototyping and bundle development called ModuleStudio or MOST.

Current status: dormant

The further development of Zikula is more or less inactive. Changes are still being made from time to time, but a release is not expected any time soon.

For a long time, Zikula's philosophy was to fulfill all wishes. For several years, it therefore moved between the worlds of content management, community system, framework and so on. This has led to the system becoming bigger and bigger instead of really cutting out old habits. Unfortunately, this paralyzed the project so that capacities could not keep up with expectations.

Zikula 3.x - the last of its kind

The releases of Zikula 3, which were based on Symfony 5, still bear witness to this old architecture. They can still be used, but they are no longer maintained. If you have any questions, please write in the Github discussions.

Zikula 4.0 - Focus on own strengths (Work in Progress)

The idea of Version 4 of Zikula is that it will fundamentally change the way Zikula works. Probably the most important change is that Zikula will no longer include Symfony and various third-party extensions, but will rather provide extensions for Symfony. Zikula bundles can then be included like any other extension using Composer and Flex. This unties some knots by making it easier to use the Symfony ecosystem instead of having to build solutions for all sorts of concerns in Zikula itself. This means a serious change: at the moment you only get Zikula completely or not at all. With core version 4, you can then start with a normal Symfony and add some Zikula bundles afterwards if you want to - just like you are used to with all kinds of other bundles. So things become much more compatible with each other.

The old core system was therefore greatly streamlined through deconstruction. For example, extensions are now only managed via Composer. UI-based settings, dynamic menus in the admin area, the block system, the outdated search module and many other things have also been removed. The hook system, to name another example, is also a thing of the past, as it basically just created a redundant additional layer to the Symfony event system. During this consolidation phase, things that already exist in the Symfony ecosystem are being dropped to avoid maintaining redundant components. This primarily includes various content management solutions.

For the future, we need to differentiate sharply and ask the question "make or buy": Where does it really make sense to invest our energy? Where is the added value of Zikula Core? How can we make even better use of the Symfony ecosystem without giving up our previous flexibility? After the obvious things have been dropped, the remaining functions are sifted through and reorganized with the aim of creating a manageable number of independent (i.e. as decoupled as possible) bundles that can also be used individually.

We have also removed some other home-made items in favor of existing solutions. These include in particular EasyAdminBundle, NucleosUserBundle and NucleosProfileBundle. However, the integration of all these functions in detail has not yet been completed.

As mentioned above, development is currently progressing rather slowly. If you have ambitions to contribute to Zikula 4, please write to us.

core's People

Contributors

390 avatar aperezm avatar cmfcmf avatar craigh avatar dependabot[bot] avatar dmm1 avatar espaan avatar gfr avatar gilloud avatar github-actions[bot] avatar guite avatar hvorragend avatar jusuff avatar kaik avatar kylegio avatar matheo avatar nmpetkov avatar pabloveintimilla avatar phaidon avatar philipp2 avatar philippniethammer avatar planetenkiller avatar rallek avatar renovate[bot] avatar rgasch avatar rmburkhead avatar rojblake avatar shefik avatar tfotis avatar yokav 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

core's Issues

Hook table fields too short.

The eventname field in the HookSubscriber and HookRuntime models has a length of 60. This is too short and can be exceeded in practice.

For example recipemanager.ui_hooks.ingredientunitassignments.validate_delete has 64 chars already. I suggest to allow 100 or even more.

This leads to the following error message:

Error on Site name

Could not load the 'extensions' module at 'initialise'.
Validation failed in class Zikula_Doctrine_Model_HookSubscriber 1 field had validation error:
    * 1 validator failed on eventname (length)

The same applies for the field areaname in the HookArea table.

Permission for multiple groups

It would be very handy to be able to define permission rules for several groups at once. For example allow "comment" for the formicula module for group x, y and z.
This does not require any logical changes within the permission system. It is mainly an user interface thingy. If component and instance is the same for several subsequent rules, show them grouped or summarized. During editing, use a multi select instead of a single dropdown.

Consider "Adaptive Images"

Automatically adapts your existing HTML images for mobile devices. No mark-up changes needed. Just drop it in and forget about it.

Why? Because your site is being increasingly viewed on smaller, slower, low bandwidth devices. Your desktop-centric images load slowly, cause UI lag, and cost your visitors un-necessary bandwidth and money. You've implemented a responsive design in CSS, and need something to adapt your 's too.

http://adaptive-images.com/

Minor fix for ModUtil

In lib/util/ModUtil.php replace

public static function isIntialized($moduleName)
{
    return (bool)(self::$ooModules[$moduleName]['initialized']);
}

by

public static function isIntialized($moduleName)
{
    return (bool)(isset(self::$ooModules[$moduleName]) && self::$ooModules[$moduleName]['initialized']);
}

Applies to both branches.

Menutree permissions bug

Already listed at: http://code.zikula.org/bianor/ticket/57

Permissions don't work for the Menutree block. In /system/Blocks/lib/Blocks/Block/Menutree.php the permissions check has to be corrected to read as follows:

/

display block */

public function display($blockinfo)
{

Security check
if (!Securityutil::checkPermission('Menutree:menutreeblock:', $blockinfo['bid'] . '::' , ACCESS_READ)) {

return false;

}

And further below:

if (!empty($varsmenutree_content?)) {

select current lang, check permissions for each item and exclude unactive nodes
$newTree = array();
$blocked = array();
foreach ($varsmenutree_content? as $id => $item) {

$item = $item[$lang];
check the permission access to the current link
$hasperms = Securityutil::checkPermission('Menutree:menutreeblock:', $blockinfo[bid] . ':' . $item[name] . ':' . $item[id] , ACCESS_READ);

profilelinkby* modifier: img parameter not recognized

The docblock says:

 *   Using language depending image from pnimg. Note that we pass
 *   the pnimg result array to the modifier as-is
 *   {img src='profile.gif' assign=profile}
 *   {$uid|profilelinkbyuid:'classname':$profile}

and the there is still some code for it in the plugin...

            if (is_array($image)) {
                // if it is an array we assume that it is an pnimg array
                $show = '<img src="' . DataUtil::formatForDisplay($image['src']) . '" alt="' . DataUtil::formatForDisplay($image['alt']) . '" width="' . DataUtil::formatForDisplay($image['width']) . '" height="' . DataUtil::formatForDisplay($image['height']) . '" />';
            } else {
                $show = '<img src="' . DataUtil::formatForDisplay($image) . '" alt="' . DataUtil::formatForDisplay($uname) . '" />';
            }

... but $show isn't used somewhere. The content of this var is not printed.

Both plugins have this problem:

  • modifier.profilelinkbyuid.php
  • modifier.profilelinkbyuname.php

render problems when same template file from different themes is used

this bug has returned http://code.zikula.org/core/ticket/2797

To replicate:

  1. Uncheck 'Force re-compilation of render templates' in Theme setings
  2. Choose andreas08 as your theme
  3. Enable search box if not enabled.
  4. Edit themes\Andreas08\templates\modules\Search\search_block_search.tpl and place a character 'A' at the top
  5. Edit themes\SeaBreeze\templates\modules\Search\search_block_search.tpl and place a character 'B' at the top
  6. go to your home page (index.php) and then switch themes (index.php?theme=Seabreeze).

You will see that 'B' isn't shown.

The problem is that Zikula_View doesn't take into account the themename

dbutil.php ->_generateCategoryFilter

I'm using

$catFilter['META'] = array('operator' => 'and');

The generated SQL has the old table prefix.

1799 $catmapobjtbl = DBUtil::getLimitedTablename('categories_mapobj');
The wrong statement?

warning message when url contains an array

if you pass an array to the url you get warning
WARN (4): E_WARNING: strip_tags() expects parameter 1 to be string, array given in src\lib\util\BlockUtil.php line 74

To replicate, just enter the following url index.php?first[1]=0

We probably need a function that handles this kind of url params eg take an array and transform it to a string representation suitable to use as url param.

Theme locale sporadically not available

My first 1.3-based sites running in production have a weird behaviour relating the Theme locale.

  • The default locale is German.
  • Module templates are always translated properly.
  • The theme templates are translated, but not always. Sometimes all strings from theme templates occur in English. It is not reproducable in every requests. The english strings occur sporadically, but if they occur then for ALL strings from the theme (e.g. whole left column and whole footer area).
  • Theme recompile is inactive (production setting).
  • Theme cache is inactive.

I think the problem is a bug in the Theme view class. It isn't related to the POT file as I regenerated that many times for incorporating updated defines. I've debugged a bit into this and came to the following:

In ZLanguage::bindDomain() starting in line 364:

    $locale = $_this->getLocale();

    // exit if the language system hasnt yet fully initialised
    if (!$locale) {
        return false;
    }

I debugged $locale at this stage for different $domain values.

For the theme domain I noticed the following behaviour: on every reload $locale was either "de" or "".

Reference topic

Remove links to the cozi

In Zikula 1.2.8 we still have some links to the cozi:

  • \docs\UPGRADING
  • \system\Admin\pntemplates\admin_admin_updatechecker.htm
  • \install\pntemplates\installer_selectmodule.htm

I think that we should remove them for the next release.

Adapt FilterUtil for Doctrine 2

FilterUtil classes must be updated in order to support Doctrine 2.

Implementation approaches
In principle it can work like it does with Doctrine 1.3 (enhance a given Query instance). Another possible approach would be to enhance DQL (e.g. by introducing a special command), but this looks too complex.
A better idea would be to enhance Doctrine field classes and add the filter functionality, so that field type and filter are not separated anymore; this way no plugin configuration would be needed; so a date field uses the date plugin automatically, and so on... the user must only assign filter string and query to FilterUtil, whereby this could ideally happen automatically as well with the help of events. The only remaining question would be how to assign the filter string, maybe with an event like UseFilterString(Tabellenname, Filterstring). The controller would then define if doing a select for table x, then use this filter. It does not matter anymore where the query is executed.

Maybe the query builder can be helpful here for building queries programmatically. This way filters and variables can be assigned independently without having to follow a certain order.

Doctrine does also know andFilter and orFilter, but this does not fit that well to FilterUtil.

Follower of this CoZi ticket

groups_user_grouprow_overview.tpl has untranslated text

Line 11…

Private

…should be…

{gt text="Private"}

ps. I'm sorry I haven't had time to figure out how to make the changes to my fork and submit a pull? request. I've been going through templates so I hope this is acceptable in the meantime.

Alert dialog for notifications with auto-hide option

Description

It would be cool if a new alert dialog type could be added to Zikula.UI. This new dialog type should be able to hide automatically after a few seconds.

Feature Benefits

In ajax applications developers can then display notification messages without having the user to exit all the windows manually.

Notes

Follower of this CoZi ticket

@jusuff

DataUtil::formatForOS() not Windows file path compatible

formatForOS() only seems to understand Linux paths.

I'm working with a windows environment and when Zikula calls the function getlocalDir that calls the function DataUtil::formatForOS(pnConfigGetVar('temp') it converts the path C:/www/pnTemp to C/www/pnTemp without colon.

Merge PageLock into Forms framework

Perhaps PageLock could become part of the Form_Render component? Every Form could trigger the pagelock for itself, so that modules do not have to integrate it explicitely.

Having it deactivated per default it could be enabled with an optional attribute, maybe something like

{form class='z-form' pagelock=true}

Follower of this CoZi ticket

Support for aria markup

Description

We should add support for WAI ARIA (Web Accessibility Initiative: Accessible Rich Internet Applications). This improves understandability of content (especially forms) for screen readers by adding semantic attributes.

Implementation approach

This can be done centrally. For example Forms can add

aria-required="true"

to all mandatory fields automatically.

Other attribute examples are aria-invalid, aria-describedby, aria-labelledby, aria-controls, aria-expanded and so on.

References

See Wikipedia for more information about ARIA.

Notes

Follower of this CoZi ticket

Problem with categories - Editing not possible

Under php 5.3.6 ( maybe under other versions of php too ) I can't change the path of a category. That is, I think, because during edting a path there are no tables shown for selecting.

Also there is this warning in developer mode:

WARN (4): E_WARNING: strip_tags() expects parameter 1 to be string, array given in /www/htdocs/w00c460e/13/lib/util/BlockUtil.php Zeile 74

Users group membership subscription page doesn't show menu

/groups/membership/action/subscribe/gid/3

The menu link to the groups index page does not to show up. Not sure if this is by design to make sure someone follows through the form by using the 'Save' or 'Cancel' buttons, however I would expect the menu to show so I can easily get back to where I came from even without using the form.

In…

/system/Groups/lib/Groups/Controller/User.php (line 162)

…mainpage should be set to false.

Patch: format DateTime objects with DateUtil

The DateUtil::formatDatetime method can be extended as follows to support the formatting of DateTime instances.

    if (!empty($datetime)) {
        if ($datetime instanceof DateTime) {
            $time = $datetime->getTimestamp();
        } else {
            $time = self::makeTimestamp($datetime);
        }
        //$time = self::parseUIDate($datetime);
    } else {
        $time = time();
    }

Problem with restoring module name

Zikula 1.3.0 final

If I try to restore the module name on /index.php?module=extensions&type=admin&func=modify&id=46 for only this module, then the core overwrites the name with the english strings.

If use the global restore in the modules' module settings (index.php?module=extensions&type=admin&func=modifyconfig) then it is using the german strings.

Recent searches availability when no search plugins

Minor issue, but it is currently possible to access the 'Recent searches list' even if their are no search plugins available. You can't get to the search results by clicking a recent search link, but you can still see what was being searched for previous to making the plugins unavailable.

I'm not exactly clear on how the checkboxes in the search config work with the search module permissions so I'm not exactly sure what the implications are for this. If I have the Pages search plugin checked, am I able to then restrict access to search the Pages module to certain groups via permissions. Does this then restrict the results in the recent searches list?

In the end, if no modules are available to search, then there should be no recent searches to view.

HTML validation error in 'formdropdownlist'

Error:

line 333 column 1 - Warnung: trimming empty <option>

Rendered source code:

332   <select id="withtid1" name="withtid1[]" class="z-form-dropdownlist">
333   <option value="" selected="selected"></option>
334   <option value="1">Blog (1)</option>
335   <option value="2">Pages (2)</option>
336   </select>

Possible solution:

We need a select option with an empty value

User name or email login

I would like to see a login where every user can use its user name or its email like in github. At the moment just one way is possible.

admin template issue when using minitabs.css

Present in 1.3.0

drop down context menu control for admintabs not visible when using minitabs.css

in the standard navtabs view this would be the downward arrow on the admin tab that would bring up the context menu of the modules included in that tab.

<span id="catcontext4" class="z-admindrop">&nbsp;</span>

this element has in the style:
background-image: url(http://z-im.com/images/global/arrow_down_grey.png);

in minitabs view this span is there, and can be clicked on to open the context menu for that tab, however the background is not set, it needs to have that arrow down in both minitabs and navtabs otherwise you do not even know that context menu is there in minitabs.

To reproduce:
in the admin panel go to the administration panel extension
then go to settings and change "style sheet to use" to "minitabs"

Seen:
observe that in the tab list there is no control to activate the context menu (downward arrow). if you check out the source you see the control (the span mentioned above) is actually there (to the right of each list item) just that it is invisible because the background is not set.

Expect to see:
Downward arrow control to activate context menu similar to in the navtabs style sheet

how to fix:
should be as easy as adding that background to the minitabs style sheet.

Menutree during Migration 1.2.6 -> 1.3

Menutree is switch from a module to the core.
After migration, only the old block menuTree is in administration.
In the documentation I noticed no pointing.

Is a conversion planned by migration? Does it need manual conversion?

Incorrect validation check in assign_concat plugin

The plugin smarty_function_assign_concat on line 46 does the following:

if (!isset($params['name']) || $params['name']) {

when this should be the following:

if (!isset($params['name']) || !$params['name']) {

Note the missing "!" in front of the 2nd params['name] check.

Error installing in "custom SQL" mode

When installing Zikula Core in "custom SQL" mode - ie, when there is a file called install/sql/custom-$lang.sql, the installer fails with the following error because it looks like $dbname is blank in lines 211-212 of install/lib.php - https://github.com/zikula/core/blob/master/src/install/lib.php#L211.

Error in DBUtil::executeSQL: SHOW TABLES FROM LIKE '%' SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE '%'' at line 1

*home doesn't work anymore

Using [*home] in the pageconfigurations.ini doesn't work anymore - maybe due to the fact that you are automatically referred to the url of the function that is set as frontpage function. So if I set:
module = News
Type = user
Func = main
And I call www.example.com I am being referred to www.example.com/news/view - which Zikula's theme engine doesn't see to recognize as being the homepage. (z1.3.1)

Load system plugins earlier to fix short urls with doctrine extensions in bootstrap code

System plugins are loaded in SystemListeners::systemPlugins():

/**
 * Load system plugins.
 *
 * Implements 'core.init' event when Zikula_Core::STAGE_LANGS.
 *
 * @param Zikula_Event $event The event handler.
 *
 * @return void
 */
public function systemPlugins(Zikula_Event $event)
{
    if ($event['stage'] & Zikula_Core::STAGE_LANGS) {
        if (!System::isInstalling()) {
            ServiceUtil::loadPersistentServices();
            PluginUtil::loadPlugins(realpath(realpath('.').'/plugins'), "SystemPlugin");
            EventUtil::loadPersistentEvents();
        }
    }
}

This should be changed to:

/**
 * Load system plugins.
 *
 * Implements 'core.init' event when Zikula_Core::STAGE_TABLES.
 *
 * @param Zikula_Event $event The event handler.
 *
 * @return void
 */
public function systemPlugins(Zikula_Event $event)
{
    if ($event['stage'] & Zikula_Core::STAGE_TABLES) {
        if (!System::isInstalling()) {
            ServiceUtil::loadPersistentServices();
            PluginUtil::loadPlugins(realpath(realpath('.').'/plugins'), "SystemPlugin");
            EventUtil::loadPersistentEvents();
        }
    }
}

Remove mintabs in Admin panel

When you change Style sheet to use to minitabs.css in Administration » System » Administration panel » Settings, the style not apply

remove frontpage module

When I try to remove a module that's set as frontpage module, I am told to make another module frontpage module. Why doesn't Zikula set the static frontpage module automatically?

Override map for config templates

Support for overrides.yml is only implemented for theme templates. As legacy has been dropped in the 1.4 master branch there is currently no way to register templates within /config/templates/. Though it is possible to add these templates to the theme override map, there is no alternative to register them in a theme-independent way.

pager can't parse three dimensional array

The following array is posted to a page in order to filter the results by selected category

array
'categories' =>
array
10 =>
array
0 => string '10001'

If i use a pager, i get a warning
WARN (4): E_WARNING: strlen() expects parameter 1 to be string, array given in C:\Development\xampp\htdocs\zikula\zikula-1.3\src\lib\viewplugins\function.pager.php line 200

This is because the page only 'understands' arrays with up to two dimensions.
So because 0 => string '10001' is an array instead of a string, it gives a warning

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.