Coder Social home page Coder Social logo

expressionengine / expressionengine-user-guide Goto Github PK

View Code? Open in Web Editor NEW
20.0 11.0 78.0 63.54 MB

The source for the HTML ExpressionEngine user guides found at https://docs.expressionengine.com

License: Apache License 2.0

JavaScript 0.99% HTML 0.23% CSS 96.31% Markdown 1.36% Shell 0.26% Less 0.84%
expressionengine docs user-guide php eecms

expressionengine-user-guide's Introduction

ExpressionEngine® User Guide

The public user guide repository for the ExpressionEngine project. The online version of the user guide is hosted at docs.expressionengine.com.

Setup

The ExpressionEngine user guide is written in human-readable Markdown and uses a simple script to generate beautiful HTML docs.

Prerequisites

Building the docs requires Node and npm (latest stable version).

In the root of the repository, install all the dependencies:

npm install

Building the Docs

To build the docs:

npm run build

To dynamically rebuild on any file changes:

npm run watch

Building theme assets

The documentation css and js files are located under theme/assets-src.

To build the theme assets, run npm run buildAssets. You can also dynamically rebuild the assets when a file changes: npm run watchAssets.

Viewing local changes

Manually load /build/index.html in your browser to view your local build. For example, file:///Users/<username>/Documents/ExpressionEngine-User-Guide/build/index.html. You can use the side navigation to navigate to different local files, but the search functionality always takes you to the live version at docs.expressionengine.com.

Contributing

See something that needs fixing? Want to improve the user guide or make it more helpful? Great! Check out CONTRIBUTING.md for details.

Copyright / License Notice

The ExpressionEngine project is copyright (c) 2003-2021 Packet Tide, LLC. (https://packettide.com) and is licensed under Apache License, Version 2.0. This project contains subcomponents with separate copyright and license terms, all of which are fully FOSS and compatible with Apache-2.0.

Complete license terms and copyright information can be found in LICENSE.txt in the root of this repository.

"ExpressionEngine" is a registered trademark of Packet Tide, LLC. in the United States and around the world. Refer to ExpressionEngine's Trademark Use Policy for access to logos and acceptable use.

expressionengine-user-guide's People

Contributors

ajohnson avatar blairliikala avatar bryannielsen avatar dependabot[bot] avatar dougblackjr avatar garethtdavies avatar geeklore avatar geoffcowan avatar ic360-com avatar intoeetive avatar jcogs-design avatar jordan-ellis avatar kylecotter avatar litzinger avatar matthewjohns0n avatar mithra62 avatar nep avatar obfuscode avatar quinnchr avatar rk311y avatar robinsowell avatar robsonsobral avatar rsanchez avatar silenz88 avatar stephengalbraith avatar swierczek avatar tomjaeger avatar tymrtn avatar willowlight avatar yulyaswan avatar

Stargazers

 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

expressionengine-user-guide's Issues

Building your own models - Relationships

Description of the problem

Error Messages




Additional context

Under the 'HasAndBelongsToMany' relationship example for building your own models, there is a missing comma in the array which describes the relationship.

protected static $_relationships = array(
'Editors' => array(
'model' => 'Member',
'type' => 'HasAndBelongsToMany',
'pivot' => 'my_model_editors' <----------------( HERE )
'from_key' => 'editor_id',
'to_key' => 'member_id'
)
);

Guidance note on Troubleshooting / Error Messages page does not link to any content

Description of the problem
The note on the docs/troubleshooting/error_messages page:

New versions of MySQL use an authentication protocol based on a password hashing algorithm that is incompatible with that used by older (pre-4.1) clients. MySQL can be configured to use the old algorithm, however. The MySQL documentation has more information on the issue.

Refers to a link to mysql.com that does not exist any more.

The note should either be corrected / updated or deleted, since as it stands it provides little useful information.

Revise upgrade instructions v2-v6

Description of the problem
As of today, the new EE6 docs haven't been updated to reflect the new update process from EE2.

They still state:

Important: If you are upgrading from ExpressionEngine 2, you must first upgrade to ExpressionEngine 3 using version 3 files and instructions. Once you have completed that update, you may return to this page and upgrade to the latest version. Please visit Upgrading from ExpressionEngine 2.

Example using CURRENT_USER given in Channel Entry / username parameter is incorrect

The text for the username parameter of the Channel Entries tag refers to use of the CURRENT_USER constant.

You can also use the constant "CURRENT_USER" to show entries from only the currently logged in user.

username="CURRENT_USER"

This allow each logged-in user to get only their entries. Users who are not logged in won’t see anything. Alternatively, you can use the constant "NOT_CURRENT_USER" to show entries except from the currently logged in user.

username="NOT_CURRENT_USER"

Since CURRENT_USER returns the User ID of the current user, not the username, this example is misleading.

Either it should be deleted, or use of CURRENT_USER should be replaced with references to {logged_in_username} which would be applicable in the example given.

Example text wrong - Class Aliases

Description of the problem
The example given for giving an add-on a Class Alias appears to be wrong.

The text suggests that the alias example given will create the alias EllisLab\ExpressionEngine\Model\Channel\ChannelEntry but the example contains the text

'aliases' => [
  'ExpressionEngine\Model\Channel\ChannelEntry',
],

Presumably the example text should be

'aliases' => [
  'EllisLab\ExpressionEngine\Model\Channel\ChannelEntry',
],

Error Messages
n/a

Additional context
n/a

Details of the `attach` method missing from Email Class

Description of the problem
The section describing the email class does not include any information about the attach method (but does include information on the clear method which alludes to the possibility of attachments via the parameter $clear_attachments).

The ability to attach files to an email is widely used within EE built in functions, and is covered by a public function attach listed in the /legacy/libraries/Email.php library. It is not clear why this method is omitted from the documentation on this class.

It would be helpful to add this method to those described for this class.

Channel entries API

Suggested Change

Guys, is it possible to bring the Channel Entries API back?

Reasoning
I can't found it, but I really need it.

Search result modal closes when window loses focus

Description of the problem
Clicking off the search input or focusing a different window closes the search results and re-focusing the window does not show it again without modifying your search input.

Standard Global Variables logged_in_location no longer exists in EE5

https://docs.expressionengine.com/latest/templates/globals/single_variables.html#logged-in-location

I was trying to use the location field of members to store a member-related variable but EE5 no longer interprets the {logged_in_location} tag, there is no "location" field anywhere in the control panel "Personal Settings" page of members (and anywhere that I can find) and the database table "exp_members" does not have a "location" column anymore.

I did a clean install of ExpressionEngine 5 (not an upgrade, no data was imported), if that helps.

"Add Row" button is not worked in the grid-input of CP/Table without adding "fieldset-faux" as parent

Description of the problem
In the document, there is the missing thing is that "fieldset-faux" is needed as a parent of the created grid structure to create the grid input in the CP/Table service.

Document: https://docs.expressionengine.com/latest/development/services/table.html#using-as-a-grid-input

Bug
If we not add the "fieldset-faux" then the "Add Row" button is not worked.

Suggestion
We can add this thing in the document as the current situation. EE team can add this class for this service via the code in the next version.

Add {switch} example in Fluid Field's Grid Example

Suggested Change
Add a single-line example of a {switch} statement inside a Fluid Field's Grid Field code example.

Reasoning
The syntax is a little different when a Grid Field is inside a Fluid Field loop:
{content:switch='odd|even'] as opposed to a stand-along Grid Field: {grid_field_name:switch='odd|even'}.

Additional context
Or maybe it's just me. When I first ran into this, I tried {content}{grid_field:switch}{/content} , then {content:grid_field:switch}, and then after a process of elimination, got the {switch} to work.

Documentation makes reference to CP menu structure from EE2

Description of the problem
A reference to CP structures from older versions of EE still remains in the documentation.

Error Messages
None

Additional context
Go to https://docs.expressionengine.com/latest/control-panel/create.html#revisions-tab. The text states: “This tab will only appear if you have Entry Versioning enabled in the particular channel’s preferences at Admin --> Channel Administration --> Channels”.

This appears to be a reference to EE2's Cp menu structures, as EE5 no longer has an 'Admin' menu. “Developer --> Channels --> [specific channel] (Settings tab)” (or something similar) would be more appropriate.

When you submit a search with enter, the search term is erased from the search box

Description of the problem
When you do a search and click enter or select a page, the search term is erased from the search box on the destination page. This makes it hard to revise your search, or even remember what your search was, if you have a short attention span.

Additional context
I think the preferred behavior should be to keep the search term in the search box. Perhaps you could set a cookie with the last search text, or store it in a session variable.

How To Edit Statuses

Suggested Change
A specific Sub Heading in the Docs for "How to Edit Statuses" would be a great help.

Reasoning
I'm a seasoned EE user and forgot how to edit Statuses (names and colours), so had to asked the EE Forum for help. I don't imagine newbies would find the current method/docs very obvious either.

Additional context
Additionally, I think more obvious visual cue in the EE interface for how to Edit Statuses would also be welcomed.
Maybe use the same layout/engine as the Category Manager.

Identification of Channel Export icon missing (as are instructions for use)

Description of the problem
Despite a link to the page in the opening text of the Channel Sets documentation page - vis -

When you export your Channel Set, you’re provided with a zip file that contains all of the data needed to recreate that same Channel on any other ExpressionEngine installation by using the Channel Set Import page.

The page linked to contains no information on how to export a channel set.

Additional context
In the end I found the instructions needed in stackexchange... what is needed is for this text to be added to the main documentation (and perhaps a heading added).

Certain codeblock syntax/content combo breaks TOC generator

Description of the problem
Backtick-delineated codeblock containing #-style markdown headers interferes with/breaks automated (H2 and H3) TOC generation for the page.

Error Messages
None, to my knowledge.

Additional context
Whilst working on some new content for the documentation (a unified guide to using Markdown), I noticed that the automatic in-page TOC generator had stopped adding items for headings below a certain point of the page (ie. only the first few H2 and H3 headings were being turned into in-page TOC items). I traced the problem to a particular codeblock that I had added. This codeblock was delineated by the triple-backtick syntax, and was used to demonstrate Markdown headers that use the #, ##, ### (etc) system. Eg:

# This is an H1
## This is an H2
### This is an H3
(etc)

Other code blocks on the same page that also used the triple-backtick system did not cause this problem, and when I changed the offending code block to one delimited by indentation rather than backticks, the problem disappeared — even though the contents of the code block was the same. The issue therefore seems to be only caused by a combination of the triple-backtick syntax, and having the # This Is A Header syntax inside.

I'll provide some examples here for further clarity (apologies for the '[3 backticks here]' faux-syntax, but I couldn't figure any other way to show code block delineation within a code block). So, this is fine:

[3 backticks here]
This is an H1
=============

This is an H2
-------------
[3 backticks here]

…and this is fine (ie. indented = codeblock):

    # This is an H1
    ## This is an H2
    ### This is an H3
    (etc)

…but this combination of the above seems to break the TOC generator:

[3 backticks here]
# This is an H1
## This is an H2
### This is an H3
(etc)
[3 backticks here]

Conceivably other combinations may also cause problems, but this is the one I ran up against.

Add-ons: Extensions, their Hooks, and Installation

Problem Overview

ExpressionEngine 6.0 introduced the Add-on Installer which helps improve Module and Extensions installation.

The documentation for the Module Installer class includes a $methods (array) property.

// defines an extension's methods and hooks that should be installed
public $methods = [
    [
        'method' => 'run', // will default to same as hook if not defined
        'hook' => 'template_fetch_template' // required
        'priority' => ""
        'enabled' => "" // y/n
    ],
    [
        'method' => 'cleanup', // will default to same as hook if not defined
        'hook' => 'template_post_parse' // required
    ]
];

This exact same property is also defined for Extension Installer.

I believe that in order to maintain the separation of functionality during installation, only the Extention installer should have the ability to install extension hooks through ExpressionEngine\Service\Addon\Installer class inheritance. That is, unless Extension Hooks and Methods can be related to classes that do not follow the file/class name schema (./addon/ext.addon.php::class Addon_ext) - But I have yet to see this.

What Likely Happened

This snippet of code was accidentally copied into the Module Installer code example.

If this is not true, the above concern should be addressed. (i.e. the ability of Module Installers to handle extension hooks/methods installation)

Solution

Check out the pull request I have made in my own fork to see the changes I am suggesting: https://github.com/RK311y/ExpressionEngine-User-Guide/pull/1/files

Missing documentation: Role Groups

I went looking for a description of member Role Groups, but there doesn't seem to be any documentation for Role Groups.

I am presuming the function of Role Groups is to function similarly to the former Member Groups, and roles provide the granularity. That is to say, you might have Role Groups called "Authors" or "Commenters" and Roles called "Can author entries" and "Can author comments" but it would be nice to have that confirmed (or rebutted) in the documentation. It's a powerful feature.

Dreamhost PHP

Suggested Change
Dreamhost automatically add a .php file with a latest version PHP folder which includes a phprc file, however you need to manually insert the "extension = fileinfo.so" into the file above and outside the brackets that Dreamhost inserts automatically, otherwise it gets overwritten with any updates, they will not do it for you so I was told.

Reasoning
Just saves a lot of digging aroung on the Dreamhost Wiki to find out why the file info does not work and clients cannot upload images after a PHP version update

Additional context

Duplicate search link names

Description of the problem
When searching for "global variables" you get three identical results called "Global Variables", two of the links are for forum variables and the other for normal template variables.

A bit confusing!

Additional context
Suggest renaming the titles used for the search links, say "Template Global variables" and "Forum Global Variables", anything to avoid confusion.

There may be other duplicate titles but I haven't found any so far.

Remove system folder rewrite from .htaccess if it's above root

Suggested Change
I suggest letting the user know they can remove the system folder rewrite line from .htaccess if it's not URL accessible (above root) whether they've renamed the system folder or not.

Reasoning
Because there are exceptions for all scenarios bar this one and it caused me to wonder if something was missing from docs because I'd renamed the system folder.

Additional context
None

Outputting Channel Entries within a Channel Categories tag

Suggested Change
It would be nice to have an example of how to output Channel Entries data, within a Channel Categories loop, on this page https://docs.expressionengine.com/latest/channels/categories.html

Reasoning
I've done this before for a couple of sites (and have just done it again) but I'm not sure it's a well known (or documented) method.

Additional context
I use this method to display all the Entries within the Categories contained in a specific Channel. eg. All the cars, vans and minibuses contained in a rental vehicles channel.
This method allows me to group all the vehicles on the page, by their category. ie. All the vans first, then all the cars and then all the minibuses.

{exp:channel:categories channel="vehicle" style="linear"}
{exp:channel:entries channel="vehicle" category="{category_id}" dynamic="no"}
vehicle data
{/exp:channel:entries}
{/exp:channel:categories}

Upgrading via the command line

Upgrading from the command line where the webroot is not owned by the webserver user

While the expression engine can be installed with an owner other then www-data, the system/user directory tree should be owned by www-data in order for the templates to synchronize correctly. That means running eecms upgrade as the non-www-data user fails because that user cannot write to the system/users/cache directory.

I wrote a script something like:
chown -R myadmin:myadmin /var/EEBLAHBLAH/system/user || exit
./eecms upgrade -v
chown -R www-data:www-data /var/EEBLAHBLAH/system/user

Error Messages

Does not apply


Additional context

Missing Documentation: Model Service - getValues()

Suggested Change

Add documentation in the Model Service for the getValues() method.

Reasoning

I believe this method would be a valuable addition to Model Methods. (Services > Model Service > Building your own Models)

Additional context

Sample Documentation

getValues()

Get an associative key-value pair array that defines a model's properties and values.

Parameter Type Description
Returns Mixed An array of model properties and values

Issue creating when upgrading from EE6 beta 4 to RC1? How Can I solve it?

Below step to create the error.

  1. Upgrade ee6 beta 4 to RC1 using the one click button.
  2. Upgrade is not completed due some error show in the view trace.
  3. Refresh the page and go back the delete upgrade class in EE folder.
  4. Then I got below error on every page page.
    image

Can you tell me how can I solve it?

Thanks

A search of entry_id does not bring back the Channel page

Description of the problem
Typing "entry_id" into the search box brings back 5 pages, but none of them are the Channel entries page, which I think should definitely be on this returned list. Then, pressing "enter" after this brings you to the "Comment Subscriptions" page, so there's no result page that shows you the actual content you might be looking for.

screenshot 2019-02-07 01 33 08

A consolidated section about building CP pages

Suggested Change
Add a page within the Add-on development section that provides a consolidated best-practice view of how CP pages are generated and constructed.

Reasoning
Particularly following the introduction of the new more accessible UI in EE6 the CP is for many sites a critical domain. EE has long provided the ability to modify / add to the pages within the CP, and there are many methods provided by EE that are related to doing this within the documentation (e.g. the series of CP/Thing Service entries under Services).

However the documentation does not provide a consolidated description of or guide to the steps involved in either creating or modifying a CP page. Rather the expectation is that Developers construct their own understanding from the snippets spread through the documentation. It would be easier if there was (at the very least) a simple index page that listed links to relevant sections of the documentation.

The introduction to the Control Panel File section of the Modules entry comes close to providing some of these elements, but a) it is buried in another page, and b) provides at best only a partial view of what is involved in constructing a CP page.

Improved Markdown documentation

Suggested Change
Comprehensive, all-in-one-place documentation for EE's specific implementation of Markdown.

Reasoning
Currently the documentation for anyone who wants to use Markdown in EE is scattered across three (arguably four) locations: John Gruber's original guide; the Markdown Extra page which consists of a list of ways in which the implementation is different to the Gruber original (ie. it notes the differences that sit atop the base rules but doesn't repeat the original guide, so a user really needs to refer to both simultaneously); and lastly the Smartypants page which lists further text transformations that sit on top of the other two guides. Additionally there is the EE documentation that links to those three pages but also makes note of specific Smartypants text transforms — which creates some ambiguity regarding whether or not the EE Smartypants parser performs all the transforms noted in the 3rd party page, or whether it is a cut-down version that only makes those changes called out in the EE docs (smart quotes, en dashes, em dashes, & ellipses).

This leaves us with 4 sources of cascading information, each one amending or overruling the previous one (or introducing mild ambiguity) — and after all that we are still left with aspects of Markdown implementation that behave differently to ALL of those sources combined. (An example: standard Markdown syntax states that a <br> can be added inside a paragraph by typing two spaces followed by the word return and then a single carriage return. The EE implementation, however, requires only the two spaces followed by a carriage return. Adding the word return in the middle in fact prevents the line break from being inserted).

It would, therefore, be extremely helpful if there could be a single, definitive documentation source for EE's Markdown implementation — ideally, a page in the docs (and linked to from the Markdown section of the text formatting page) that distils the documentation from the various 3rd party sources into a single, rational whole, which removes any standard Markdown syntax rules that do not apply to EE's library, and which also documents any additional quirks specific to the EE implementation.

Additional context
None

Search result limit not showing enough results for common keywords

Description of the problem
The Algolia search result limit of 5 is preventing some more common keywords from showing a result a user is looking for.

Specific example of searching for "categories" to find the Channel Entry > Categories tag pair result is not show because it's such a common keyword. We should expand the search results or find a better way to display them if you're looking for something too common.

Model Relationships: typo in example code

Description of the problem
In the description of model relationships there are several examples of code used to define relationships between models. The examples all have the same basic core that looks something like this:

protected static $_relationships = array(
  'Author' => array(
    'model' => 'Member',
    'type' => 'BelongsTo'
  )
);

For EE6 at least this construct appears to be incorrect, as using this type of construct omits the ee: prefix and (at least in this authors test system) without this prefix EE will reject the relationship throwing an error of the form:

Unknown model "Member". Used in model "myAddon:Model" for a relationship called "Reln".

Adding the ee: prefix eliminates the error and leads to normal operation.

protected static $_relationships = array(
  'Author' => array(
    'model' => 'ee:Member',
    'type' => 'BelongsTo'
  )
);

However it may be that this is an issue unique to my system, so I would value observations about whether or not this is indeed a documentation bug.

If it is indeed a bug I'm happy to amend the documentation as required.

Additional context
The ee: prefix is used in relationship definitions within the EE code (e.g. in Addons\Forum\Model\Administrator.php).

Missing Documentation: Model Service - $_type_classes

Suggested Change

Add documentation to describe $_type_classes property for the Model Service. The use case I have found which demonstrates this can be found in the Site Model

Note: While writing this issue, I noticed that this model now does not actually use a custom $_type_classes for any of its properties: ExpressionEngine\Service\Model\Column\CustomType

I am assuming that this change happened between version 5 and 6.

Reasoning

The documentation does describe Typed Columns but it does not describe that Composite Types can be custom.

Example of a custom composite type: ChannelPreferences

Additional context

I assume that the Site Model no longer utilizes these custom $_type_classes because information stored in these variables is only accessible once the model has been loaded, therefore these property values cannot be used when filtering for models. Is this correct?

Also, I have not looked deeper into this, but the Site Model was the only model I was familiar with that used this type of Variable Column. My next question is whether or not the uses of $_type_classes are being phased out in a later version?

Documentation search not functioning as expected

Description of the problem
The documentation search field returns a 404 page when used from certain URLs, regardless of the search term used.

Error Messages


Page Not Found
The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.

Visit the Home Page

Additional context
You can reproduce by using the "search eecms docs" search input from this URL https://docs.expressionengine.com/search/latest/?q=template_id

Tested terms: module, channel, config, search, template

This URL produces a 404 as well, so you can see the 404 as described above.
https://docs.expressionengine.com/search/v5/?q=channel

Template Language - minor error in documentation

Description of the problem
I noticed a minor error in the docs when looking at the provided examples on this page:
https://docs.expressionengine.com/latest/templates/language.html#changing-parsing-order
https://github.com/ExpressionEngine/ExpressionEngine-User-Guide/blob/stability/docs/templates/language.md

The examples use the {content} tag, but this should be updated to be {item_content}.
as per RSS Parser documentation: https://docs.expressionengine.com/latest/add-ons/rss-parser.html

Updated 'Examples' Section

Replace {content} with {item_content}


Examples

Here are some examples to help illustrate the parsing order.:

{exp:rss_parser url="https://ellislab.com/blog/rss-feed" limit="5" parse="inward"}
    {feed_items}
        <a href="{item_link}">{item_title}</a><br />
        {exp:word_limit total="20"}
            {!--{content}--}
            {item_content} 
        {/exp:word_limit}<br />
    {/feed_items}
{/exp:rss_parser}

With the above, the RSS plugin will be parsed first. This will allow the content of the {content} variable to be available to the other, nested plugin: "word_limit".

Here is a much more complicated example that demonstrates both parsing orders in action.:

{exp:rss_parser url="https://ellislab.com/blog/rss-feed" limit="5" parse="inward"}
    <ul>
    {feed_items}
        <li><a href="{item_link}">{item_title}</a><br />
                {exp:word_limit total="35"}
                    {exp:xml_encode}
                        {!--{content}--}
                        {item_content}
                    {/exp:xml_encode}
                {/exp:word_limit}
            </li>
    {/feed_items}
    </ul>
{/exp:rss_parser}

Broken Links to Control Panel Style Guide

References to the Control Panel Style guide go to 404 pages.
For example the links to style guide on CP/Alert Services, CP/Filter Service CP/Modal Service, CP/Pagination Service, and the CP/Table Service.

All these links attempt to connect to pages under https://expressionengine.com/style-guide/ (which itself also 404s).

There are other links that still point to the EllisLabs page for the (absent) style-guide.

E.g. This link Section Header - which points to https://ellislab.com/style-guide/c/structure#section-header - appears on the Modules Page.

Legacy Channel Entries API docs needs to be removed

Description of the problem

The legacy Channel Entries API was deprecated in v3, and is not viable for v4+ due to the improved storage architecture. But those pages are still available even in the v5 docs, with not mention to not use them.

Suggested change: add a deprecation notice to the v3 docs for this API since that's the version it was deprecated in, and remove those pages entirely from the v4 and v5 docs.

See: ExpressionEngine/ExpressionEngine#80

Missing Documentation: Model Service - $_hook_id

Suggested Change

The Model Service documentation is missing a description of the $_hook_id property. The example I have found that uses this property is within the Member Model.

Reasoning

I was developing an add-on that contains a Contact model which belongsTo the ee:Member model.
Being curious in the process in which member models are saved/updated/inserted/deleted, I went searching for the extension hook call before_member_save($member, $values).

Based on the documentation, I was lead to believe that all extension hooks are invoked via some code that looks like:

if (ee()->extensions->active_hook('some_hook_method') === TRUE)
{
    $str = ee()->extensions->call('some_hook_method', $hook_args...);
}

Unable to locate the existence of such code, with the hook method before_member_save, I did some deeper digging.

I learned that Models, which extend the ExpressionEngine\Service\Model class invoke the forwardEventToHooks($event) method. Walking through the code of this method, I discovered that:

  1. Models which have a $_hook_id property defined are exposed to extension hook calls (Event name, either 'insert', 'update', 'save', or 'delete') based on the following convention:
$forwarded = array(
    'before' . $uc_first_event => 'before_' . $hook_basename . '_' . $event,
    'after' . $uc_first_event => 'after_' . $hook_basename . '_' . $event
);
  1. Internal events on the Model are also emitted without having to call them externally: For example:
$model = ee('Model')->get('Member')->first();
$model->validate(); // internally, $this->emit('beforeValidate') and $this->emit('afterValidate') are called
$model->save(); // internally, $this->emit('beforeSave') and $this->emit('afterSave') are called
// .... etc

Before I was attaching my own events for these actions and having to emit (invoke) them manually.

Additional context

I would recommend adding this documentation here: Building your own Models

Ellislab copyright and link in docs footer

In the footer of each article, it says:

©2002–2020 EllisLab Corp.

With a broken link. My understanding is this should be Packet Tide instead? Or at the very least the link should point to expressionengine.com.

Typographical Error - Channel Module Extension Hooks

Description of the problem
There appears to be a typographical error in the list of hooks described on this page: specifically the hook 'channel_entries_tagdata_end' is labelled in the list of hooks and via heading as 'function_name'.

Additional context
Link to page in documentation: https://docs.expressionengine.com/latest/development/extension-hooks/module/channel.html#channel_entries_rowthis-row

Issue appears in documentation for V5 and V6

Query module pagination?

The docs simply say "The Query module uses the same pagination syntax as all first-party modules. Please look at the Pagination documentation for more information."

By that, I would assume applying the limit= and paginate= parameters to the exp:query line would work – but it doesn't... so potentially a bug, but either way needs better documentation if pagination within the query tag is possible.

Docker build fails with missing easy_install

Description of the problem
Running ./eetools createcontainer results in the following error:

Step 4/12 : RUN easy_install -U sphinx
 ---> Running in 7627b15ba366
/bin/sh: 1: easy_install: not found
The command '/bin/sh -c easy_install -U sphinx' returned a non-zero code: 127

Additional context
The base image ubuntu:latest (18.04) no longer contains the easy_install scripts - see this issue for more details https://bugs.launchpad.net/ubuntu/+source/python-setuptools/+bug/1774419

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.