Read in articles with the Table class, e.g. with the extension (Spreadsheet Data Uploader https://gitlab.com/Gratia-Mira/spreadsheet-data-uploader). Attention, this is an alpha variant!
Die Artikel im Backend sehen!
Mit derselben Erweiterung funktioniert des mit den Kategorien.
The articles are not displayed, although they are correctly in the database (as far as I can see).
mysql
10.4.19-MariaDB
PHP 7.4.20
Webserver Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/7.4.20
Thank you for being able to look at the problem. It really seems like something Joomla 4 could improve on.
Otherwise, I would be happy to receive alternative suggestions to the Tabel class.
Labels |
Added:
No Code Attached Yet
|
This was not necessary with Joomla 3.
and it should not be necessary in Joomla 4 if you are not using the workflows
ok, for me the articles were only displayed in the backend when I also used this table... and someone else had the same problem...
I don't use workflow or not consciously...
look at content created in joomla - that table is empty if you dont use workflows
Ok, that's right! Nevertheless, the articles are only displayed when I fill this table. And I really haven't activated workflow. It is a new Joomla 4 installation.
Could filling this database table have any negative consequences?
Thank you very much for your feedback!
@Gratia-Mira is right had the same problem. Solved it the same way.
@alexandreelise Thanks for your feedback!
There is definitely a bug/error somewhere
I hear people run into this all the time, that the workflow association table must be filled. We should check if workflow is active before joining the table. Agree it is a bug.
You should not have to write "workarounds". Its obviously a bug - write a fix.
I experienced the same problem. Updating workflow_associations
make the articles appears in admin backend, yet not in frontend.
I've added via mysql:
One article in "Uncategorised" has been added normally via admin backend.
This is the current state in frontend
Home page with "Categories" view
Uncategorised category view in which you can only see the article added via admin backend
I've added via mysql:
What exactly was your query
You should not have to write "workarounds". Its obviously a bug - write a fix.
I'm sorry, I'm not in a position to do that. I only started learning php two years ago. Before that I was only a Joomla user. But I will do it if I ever get that far.
@Gratia-Mira @alexandreelise Please go into the database and tell me what the value of asset_id field is for the articles that do not appear in the admin. AND check the database and tell me if there is an entry in the _assets table with a matching id
@brianteeman the purpose of the script is to migrate articles and categories from j2.5 installation to a j4 one.
It is long but if you look at it is very simple
https://pastebin.com/EyBtaPgX
Please go into the database and tell me what the value of asset_id field is for the articles that do not appear in the admin. AND check the database and tell me if there is an entry in the _assets table with a matching id
the workflows associations is created when the article is created
@bembelimen why is this happening if the workflows is not in use on the site?
@brianteeman as I said, after I read this ticket I manage to see the articles in backend (by adding entries in workflow_associations
). Now the problem is the frontend. The articles I added are not there.
The asset_id
FKs in content
correctly match the entries in assets
table.
Can you share one record from the content table that is not being displayed please. I can now replicate the admin issue when no workflow_association but they are displayed in the frontend so you must be missing something else
@Gratia-Mira @alexandreelise Please go into the database and tell me what the value of asset_id field is for the articles that do not appear in the admin. AND check the database and tell me if there is an entry in the _assets table with a matching id
Yes, there is a matching entry in the table assets!
This is an entry in content
table in json
{"id":"3","asset_id":"92","title":"article3 source","alias":"article3","introtext":"<p>article3<\/p>","fulltext":"","state":"1","catid":"8","created":"2021-12-31 21:37:35","created_by":"666","created_by_alias":"","modified":"2022-01-02 22:37:41","modified_by":"666","checked_out":null,"checked_out_time":null,"publish_up":"2022-01-02 22:37:49","publish_down":null,"images":"{\"image_intro\":\"\",\"image_intro_alt\":\"\",\"float_intro\":\"\",\"image_intro_caption\":\"\",\"image_fulltext\":\"\",\"image_fulltext_alt\":\"\",\"float_fulltext\":\"\",\"image_fulltext_caption\":\"\"}","urls":"{\"urla\":\"\",\"urlatext\":\"\",\"targeta\":\"\",\"urlb\":\"\",\"urlbtext\":\"\",\"targetb\":\"\",\"urlc\":\"\",\"urlctext\":\"\",\"targetc\":\"\"}","attribs":"{\"article_layout\":\"\",\"show_title\":\"\",\"link_titles\":\"\",\"show_tags\":\"\",\"show_intro\":\"\",\"info_block_position\":\"\",\"info_block_show_title\":\"\",\"show_category\":\"\",\"link_category\":\"\",\"show_parent_category\":\"\",\"link_parent_category\":\"\",\"show_author\":\"\",\"link_author\":\"\",\"show_create_date\":\"\",\"show_modify_date\":\"\",\"show_publish_date\":\"\",\"show_item_navigation\":\"\",\"show_hits\":\"\",\"show_noauth\":\"\",\"urls_position\":\"\",\"alternative_readmore\":\"\",\"article_page_title\":\"\",\"show_publishing_options\":\"\",\"show_article_options\":\"\",\"show_urls_images_backend\":\"\",\"show_urls_images_frontend\":\"\"}","version":"2","ordering":"0","metakey":"","metadesc":"","access":"1","hits":"0","metadata":"{\"robots\":\"\",\"author\":\"\",\"rights\":\"\"}","featured":"0","language":"*","note":""}
this is the related asset
{"id":"92","parent_id":"89","lft":"25","rgt":"26","level":"3","name":"com_content.article.3","title":"article3 source","rules":"{\"core.delete\":{\"6\":1},\"core.edit\":{\"6\":1,\"4\":1},\"core.edit.state\":{\"6\":1,\"5\":1}}"}
please tell me if you prefer a different format.
@brianteeman It's a long time ago. Maybe it has been fixed by then.
You always need a stage mapping, so your Joomla site does not crash if you enable the workflow.
You should use the article model to save articles not the table.
Thanks @bembelimen that should be the answer for everyone.
@antonioalamura your issue might be different, I will try to spend some time tomorrow
@brianteeman thanks.
If you want to test my code just use a fresh j2.5 installation (with a couple of articles added via backend) and a fresh j4 one.
The only params are on top of the script: these 2 arrays $source
, $target
, and db credentials.
Thank you all so much!
This was my first ticket. Am I responsible for closing it or should I leave it open?
Hi, has this issue been resolved?
I'm having the same problem, any suggestion ?
Workflow is disabled in my J4.4 install
You always need a stage mapping, so your Joomla site does not crash if you enable the workflow.
You should use the article model to save articles not the table.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-01-26 20:40:34 |
Closed_By | ⇒ | Gratia-Mira |
I found the problem and wrote a workaround. This was not necessary with Joomla 3.