jan-vince / smallrecords Goto Github PK
View Code? Open in Web Editor NEWOctoberCMS plugin to store and manage records and lists
License: MIT License
OctoberCMS plugin to store and manage records and lists
License: MIT License
When editting attributes for existing records, it gives me the error that: Model 'Backend\Behaviors\RelationController' with ID x is not found
Can I make use of 2 or more recordDetail component in a single page?
I have tried alias but it seems that the aliasing the components doesn't work
Hi Jan,
quick question:
How can I remove record & Category from the url.
so for example now it is:
mywebsite/category/test
& I would like:
mywebsite/test'
same goes for record.
can you provide me the correct url set up in the page url and what to change in the component?
is there away to list areas I tried this but it doesn't seem to work
<?php
use JanVince\SmallRecords\Models\Area;
$years = Area::all()->list('slug')->toArray();
?>
<?php
echo $years;
?>
Shouldn't the 404 response look sth like this?
file: components/RecordDetails.php
public function onRun()
{
$this->recordDetail = $this->page['recordDetail'] = $this->getRecord();
if( $this->property('recordSlug') and !$this->recordDetail ){
**return \Response::make($this->controller->run('404'), 404);**
}
}
Maybe it should check if page 404 exist first... if not then do abort(404...?
Regard,
Darjan
This would be a great feature: https://octobercms.com/plugin/offline-sitesearch
Regard,
Darjan
Is it possible to create a new permission for other users seeing all records in a list but only be able to edit records created by them self (like for rainlab blog Plugin)?
Components working just fine, but when i try to customize them using octobercms fork button are not working. I can't understand this behavior. Even if i open component using fork button and save it without any changes, the component is not working.
Is there a possibility to have for new records the custom data form visible by default instead of having to click on "Add Custom Data"?
Hello, nice plugin!
Please add "color" to available record filelds.
Hi,
I'm trying to add a new content manager and after clicking on Manage Roles in Administrators settings, I get this error:
array_merge(): Argument #2 is not an array
.../plugins/janvince/smallrecords/Plugin.php line 172
Same thing happens if I try to create a new Administrator. It seems that the $customPermission must be and empty array at creation.
All plugins and core is current.
Regard,
Darjan
Hi, I was able to get the stored images from recordDetail.images, however I cant figure out how to show them correctly. (see added screenshot) Could you perhaps take a look?
I have uploaded multiple images, and I would like to show them all, but currently the are all displayed like this: <img src="%20img1uploadpath%20img2uploadpath2 etc
here is what my component looks like:
{% if recordDetail.images %} <img alt="" src="{{ recordDetail.images }}" /> {% endif %} <h3 class="record-box-title"> {{ __SELF__.recordDetail.name }} </h3>
I had a error when visiting Areas after I created 1 Area ( "Portfolio" ).
We're sorry, but an unhandled error occurred. Please see the details below.
count(): Parameter must be an array or an object that implements Countable
D:\xampp\htdocs\xjoeyv\plugins\janvince\smallrecords\Plugin.php line 193
( Error Page (if you save the html and open it: https://gist.github.com/xJoeyv/0868e444c9e3ecfc60d0abe9b006a736 )
Creating and updating one by changing the route works still fine!
Is there a way to sort the record relations to any other value than added ascending order?
For example I would like to sort tags by slug not by the added order, so I can group them together by similarity and make them easier to find...
... or have the option to filter tags?
Regard,
Darjan
First, thanks for bringing in my fixes. Much appreciated. I am using this plugin in a major website visited by tens of thousands now. Even used it to replace 301 Redirects plugin. Seems to be holding up very well.
My teammate (senior with 30 years experience) was using this and he was attempting to key in the same record name with the same slug.
An SQL error in a modal appeared, which I understood what it was. But to him, it seemed like the plugin had a really bad bug.
As I am intending to open the OctoberCMS backend to less technical team members for content management, is it possible to replace that with a friendlier error message such as "Record of the same name / slug exists"?
Thanks. Any tips/hacks will do as well.
Hi,
I've tried to replace the record preview_image "fileupload" widget to "mediafinder". When creating/editing a recod, the widget does load, but it does not store the selected file.
So far i changed the models/record/fields.yaml file. What else do I need to change to make this work? I am quite new to Laravel and OctoberCMS.
I would like the mediafinder because a lot of records will have duplicate images not unique images. Same will have to be applied to Images tab too.
Regard,
Darjan
Hi, I followed the documentation, created the list and created the pages as indicated but I don't see any element in the frontend
Hi Jan, thank you for this plugin!
Unfortunately, I can't get it working properly.
What are the correct settings for the records page and the connection to the single record page?
The slug keeps returning the wrong url > /default
Is there a demo backend available, cause there is not much documentation.
Please let me know.
i have a page with list of services(treatment.htm) when i click on each service it needs to goto its respective page...
in treatment.htm added record component and link as treatment.htm , in treatments page record detail component added but still data not visible in the detail page.. tried all the ways but i'm unable to where was the mistake
Hi,
an error pops up when trying to insert record testimonials without the Translate plugin:
"The partial '_field_mltext.htm' is not found."
Probably because the form widget for testimonal title, author and content is set "mltext" and "mlricheditor"?
Regard,
Darjan
Hello,
I've noticed that component records when set orderBy = "name"
will only sort by default language.
Here's an example where my default language is Portuguese:
[records entradas]
areaSlug = "entradas"
categorySlug = "{{ :category }}"
tagSlug = "{{ :tag }}"
activeOnly = 1
limit = 10
detailPageSlug = "homepage"
detailPageParam = "{{ :slug }}"
orderBy = "name"
orderByDirection = "ASC"
As you can see, it is sort in Portuguese only even when I change current language.
Am i missing something?
Thanks in advance.
Trying to place testimonials and what not on a page for record details.
{% for testimonial in records.items.testimonials %}
{% if testimonial is not empty %}
{{ testimonial.testimonial_content }}
{% endif %}
{% endfor %}
That code doesn't seem to access anything but an empty array.
What's the best way to call these nested objects for templates (testimonials and content blocks)?
Hi,
I am searching to put the record name in the meta title of the page... If someone can help me.
Thanks.
Hi I'm sorry for asking but can you tell me what is the correct path for "tag" and "attribute"?
for Tag i tried: {{ __SELF__.recordDetail.tag }}
to show the active tags that are selected
however that didn't worked so far.
And I created an attribute called "Plaats" translated: "place" which I tried to output like this:
{% for attribute in record.attributes %}
{{ attribute.plaats }} : {{ attribute.value }}
{% endfor %}
but thats not working either.
Can you please show me what the correct path is so I can use your plugin for more future projects?
I've been trying really hard to filter records by category without success.
title = "Historial de Projetos"
url = "/historial-de-projetos"
[records]
areaSlug = "projetos-de-investimento"
categorySlug = "{{ :category }}"
tagSlug = "{{ :tag }}"
activeOnly = 0
limit = 10
detailPageSlug = "projetos"
detailPageParam = "slug"
orderBy = "date"
orderByDirection = "DESC"
When I access historial-de-projetos page it shows the the records.
title = "Historial de Projetos por Categorias"
url = "/historial-de-projetos/:category"
[records]
areaSlug = "projetos-de-investimento"
categorySlug = "{{ :category }}"
tagSlug = "{{ :tag }}"
activeOnly = 0
limit = 10
detailPageSlug = "projetos"
detailPageParam = "slug"
orderBy = "date"
orderByDirection = "DESC"
When I access historial-de-projetos/restaurantes page it shows no records at all.
I'm generating the categories menu with component categories:
[categories projetCategories]
areaSlug = "0"
categorySlug = "{{ :category }}"
activeOnly = 1
rootOnly = 0
limit = 10
Any ideas what might be wrong?
Hi Jan! Thanks for this awesome plugin. It's been unbelievably helpful to build websites really quick.
One thing I'm currently having problem is that I cannot find a way to filter records by their attributes. Context: My client is a yacht buyer/seller firm and they list their current yachts. We want to build a search/filter system to filter yachts by their length and price.
I've looked through the files of the plugin and realized that in components/Records.php
there isn't a method that it exposes the query object, but it creates a query and returns a collection directly. I'm happy to contribute via a PR but I'd like to get your opinion on how to accomplish it first.
"Record not found!"
I thing this is a very useful plugin and I just want to relate an issue that I did not find a solution.
Hi,
Do you plan to add prev/next record in record component ?
Thanks.
First of all i want to say that this is one of the best plugins out there. Now i want to point some issues:
After you create a record list on backend, you open the first record and down left side on the navigation arrows if i click the left arrow i get:
Missing argument 2 for JanVince\SmallRecords\Controllers\Records::update()
I try to create a record list page and a record details page but something is wrong with the slug. I try to figure out what is the problem without success. First i create record details page with name record, i throw inside component record and i give the url /record/:slug. Then i create record list page with name records, i throw inside component records, i select record details page inside component. I get the records on frontend but when i click on one record i don't get the detailed page of record. Slugs are wrong. What i missing here?
I search for a pagination but i didn't found one. I guess this is something i must do by my self. However is a very good option to implement.
Inside database i saw that on every record on records table is a category_id table that stores category table id's. But there is also a pivot table for categories and records. I really confused here. 2 ways for storing category id s on records?
I'm really sorry for any mistakes, and for your time.
Thank you
When you switch language in single record page, the slug doesn't change
Reproduce
make an item in 2 languages
Hi,
I seem to be unable to access the category preview image.
Is there a way to do it or do I have to use the Images section?
Thank you.
@jan-vince would it be possible for the Categories component to have the option to not show categories that do not have a single active record. At the same time to only count the number of active records not all records as is now (it counts also inactive records).
Regard,
Darjan
Hello, I have tried bunch of things like adding assets manually and with plugin, Enable/Disable AJAX, set redirection page but no luck. There is no error in javascript side I'm little confused about this problem. Actually, I even tried submitting form with $("form").submit();
The default category storing all records like
/category/default
is not returning any records
Record slugs cannot accept less than 3 characters. How do I get around this?
Thank you for great plugin.
It's very usefull, but not usable "out of the box" in cases when we need to call Record component without adding it to page through {% component 'records' %}
.
I try to render list manually, but discover that detailPageSlug
is not accessible in that context.
I fixed this with adding few lines of code (if it possible, add it to plugin):
// file Records.php line 15 (after)
public $detailPageSlug;
// line 111 (after onRender method)
public function onRun()
{
$this->detailPageSlug = $this->property('detailPageSlug');
}
It will do that code fully working:
{% for record in records.items %}
<a href="/{{ records.detailPageSlug }}/{{ record.slug }}">
{{ record.name }}
</a>
{% endfor %}
First, I really love your plugin and appreciate all the new features you've implemented. Thank you!
The arrows still appear when viewing a single record and are still broken:
Missing argument 2 for JanVince\SmallRecords\Controllers\Records::update()
/var/www/html/plugins/janvince/smallrecords/controllers/Records.php line 126
I noticed a small bug where if you delete a record from a list, it will show records from other lists in the list until you refresh the page.
There is also a bug with the custom order where it shows all records in all lists, instead of being able to create a custom order for each list.
I have a suggestion, as well. I think this plugin would be much more powerful if you could also create categories and tags for each individual list.
Hi, for bootstrapp I have to use active class item in carousel. So how can I use {{ image.getpath() }} to find first image and then {{ image.getpath() }} all the other images except the first one?
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'visible' in 'where clause' (SQL: select count(*) as aggregate from
janvince_smallrecords_recordswhere visible <> true and
area_id = 1)
/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php line 664
By default the component setting is "only show active". I did not have this attribute selected on the list I had made. So instead of removing the default "only show active", I decided to simply add the attribute so I can disable items in the list.
However, when I added the new attribute I get the above error when trying to view the list from the backend when I was trying to add the active state to each of the records. This error shows on all lists I made, not just the one I tried to add the active attribute to.
Hello,
I was wondering if it's possible to add another possibility to the attachment section.
Sometimes i also would like to add additional files which are not hosted on our server as the original file is kept more up to date from the creator. The location and name stays the same but the files are updated frequently.
Basically i would like to use an external URL like http://example.com/downloads/file.pdf or a combination of both lokal and several external files referenced with an URL like above to add them in the attachment section.
Is this possible or is there another good way of doing this?
Another good option would be to include the media finder to select already uploaded files like it is used at the Image section.
Thanks
Hi there
I am creating a portfolio record page and I'm having problems retrieving the custom field values using Twig. A couple of the field names I have created so far are; clientBackground (text) , projectSummary (richtext) and clientImage (mediafinder). They aren't being used as repeatable fields but will add add a few more in in due course.
I am quite new to October, apologies if this is something simple, so any help would be appreciated.
Thanks
@jan-vince I'm experiencing that Custom form fields with the same name as the record values are overwriten.
For example if in the Custom form field I set a field name as "name" it overwrites the record name value when saving values.
When in a list on the backend I have found a couple errors:
When you click "Create" and hit "Cancel", I get the following error:
Missing argument 1 for JanVince\SmallRecords\Controllers\Records::index() /var/www/html/plugins/janvince/smallrecords/controllers/Records.php line 49
When in an item page within a list and you hit either of the arrows at the bottom right, I get the following error:
Missing argument 2 for JanVince\SmallRecords\Controllers\Records::update() /var/www/html/plugins/janvince/smallrecords/controllers/Records.php line 110
How to reproduce:
Expected behavior:
Snippet appears in the focused (or, if not applicable, the first) rich editor of the currently open tab at the caret position
Actual behavior:
An alternative fix would be to make the option say "Caution, you will not be able to use Snippets" ๐
Hello,
Is it possible that the component Categories "Only with records in list" use record "categories" field to filter active categories ?
Thanks.
Tell me how to do pagination
Hello,
I added attribute value in Polish language, and everything works but after switching this input to english and saving english value new value and polish value are cleaned.
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.