Skip to content

Instantly share code, notes, and snippets.

@carlitorweb
Last active April 20, 2024 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlitorweb/d42b63310286dd0e45714d8132cd2220 to your computer and use it in GitHub Desktop.
Save carlitorweb/d42b63310286dd0e45714d8132cd2220 to your computer and use it in GitHub Desktop.
Your site has been upgraded from joomla 3 unsuccessfuly or that you have copied articles directly from another site using the database
-- A upgrade from 3 to 4 (or copy manually the content table) was not completed successfuly
-- as it should have created a record for each article in the #_workflow_associations table. (even if you are not using workflows it needs a record in that table).
-- Newly created articles in j4 or higher have that record created automatically.
-- The sql query below should create the missing records for you.
--
-- replace #_ with your own db prefix
INSERT INTO #__workflow_associations (item_id, stage_id, extension)
SELECT c.id as item_id, '1', 'com_content.article' FROM #__content AS c
WHERE NOT EXISTS (SELECT wa.item_id FROM #__workflow_associations AS wa WHERE wa.item_id = c.id);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment