No Code Attached Yet Information Required bug
avatar OlivierCARRE-O2C
OlivierCARRE-O2C
28 Dec 2022

Steps to reproduce the issue

We have custom fields under Joomla 3.x for our contact form.
Since we update Joomla to 4.x, we do not have any control on those fields.
On web videos, we can see a field menu under the contact one, we do not have this kind of display ?
The problem in on our contact form where those customs fields are displayed with the text 'COM_CONTACT_OPTIONAL' just after the title of the field - you can see them on the contact form of our site 'o2c-sc.com'

Expected result

We want to access our customs fields issued from Joomla 3.x to understand and change the display of the additional text 'COM_CONTACT_OPTIONAL'

Actual result

No menu to access customs field in the contact menu

System information (as much as possible)

Joomla 4.0 to 4.2.6 - no evolution from version to version 4.x - french language

Additional comments

Votes

# of Users Experiencing Issue
2/2
Average Importance Score
3.50

avatar OlivierCARRE-O2C OlivierCARRE-O2C - open - 28 Dec 2022
avatar OlivierCARRE-O2C OlivierCARRE-O2C - change - 28 Dec 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 28 Dec 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Dec 2022
avatar brianteeman
brianteeman - comment - 28 Dec 2022

Check the options

image

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 28 Dec 2022

As you can see, the option is already Ok but we do not have any access to the dedicated menu


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39517.

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 28 Dec 2022
avatar alikon
alikon - comment - 30 Dec 2022

can you check this query

SELECT * FROM `#__menu` 
WHERE link in ('index.php?option=com_fields&context=com_contact.contact', 
'index.php?option=com_fields&view=groups&context=com_contact.contact');
avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 30 Dec 2022

The result is empty
Empty result

avatar chmst
chmst - comment - 9 Jan 2023

Please check if com_fields is enabled, in system manage extensions.

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 9 Jan 2023

Hello, I do not understand where do you find "com_fields" in system manage extensions, see screen copy hereafter :screen shot 2023-01-09 at 17 32 31screen shot 2023-01-09 at 17 32 50screen shot 2023-01-09 at 17 33 02


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39517.

avatar brianteeman
brianteeman - comment - 10 Jan 2023

It is the second item in your screenshot.

Please go to Contacts->Options->Integrations and check that it says to edit fields

image

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 10 Jan 2023

Hello Brian,

you ever ask me this question (it was the first one of this issue) and the answer is Yes as you can see in my first screenshot at the beginning of this comment list(but in French "Intégration des champs" equal "Oui").
I think that 'alikon' ask me a question after you about the content of the table '__menu' of our database and when I have done the SQL request on the database, the result was empty. I think it is not the right think even if we only upgrade Joomla automatically from 3.7.0 to 4.0.0 and now to 4.2.6 ???
Do you have any idea ?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39517.

avatar brianteeman
brianteeman - comment - 10 Jan 2023

Sorry I forgot I aleready asked you that question. Its the only thing I can think of. Sorry

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 10 Jan 2023

Thank you for your help. Perhaps this issue is a real one ! not so simple ...


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39517.

avatar chmst
chmst - comment - 10 Jan 2023

After all, the question is, why the entries are missing in the database, as @alikon asked.
Is it possible that you have not only this one table prefix in your database but different databases?

Could you check your table #__menus
SELECT * FROM#__menu WHERE link like "%field%" ?

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 11 Jan 2023

Hello #chmst,
I have checked the database : all the tables begin by 'mod149_' and so the result of the request is still empty


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39517.

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 2 Feb 2023

May someone help me ? It seems to be a real problem with Joomla 4 as nobody know any solution : 2 of us ask me for any filed menu into Joomla database - why the result is still empty ? How can i do to correct it ?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39517.

avatar chmst
chmst - comment - 3 Feb 2023

I have still no solution.
Is it possible, that com_contact was deinstalled and then installed again?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39517.

avatar ReLater
ReLater - comment - 4 Feb 2023

I have checked the database : all the tables begin by 'mod149_' and so the result of the request is still empty

Just to go sure; you tried:

SELECT * FROM mod149_menu WHERE link like "%field%"

?

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 4 Feb 2023

Yes, the SQL request SELECT * FROM mod149_menu WHERE link like "%field%" have an empty result
The upgrade process from JOOMLA 3.X to 4.X generate something wrong concerning the database
I do not know how to installed again only this part of JOOMLA without affect all the website !


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39517.

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023
avatar chmst
chmst - comment - 16 Jun 2023

Same was mentioned today on facebook - weird

avatar chmst
chmst - comment - 16 Jun 2023

@OlivierCARRE-O2C is this still an open issue or could you find what caused the issue?

avatar Quy Quy - change - 16 Jun 2023
Labels Added: Information Required
avatar Quy Quy - labeled - 16 Jun 2023
avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 17 Jun 2023

Hello Christiane,
You speak about a facebook article - do you have any link to this article, I do not find it with google ?
It still an issue on our website today.
Best regards, Olivier

avatar webgras
webgras - comment - 19 Jun 2023

Hi,

I just experienced the same problem after an upgrade from J3.10.11.

There for some time (=years) com_contact was deactivated. But before the update to J4 we activated it again.

Can you reach the view with the direct link?

administrator/index.php?option=com_fields&view=fields&context=com_contact.article

It works for me, just the menu-items are missing.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39517.

avatar webgras
webgras - comment - 19 Jun 2023

sorry, link should be

administrator/index.php?option=com_fields&context=com_contact.contact

(not com_contact.article)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39517.

avatar brianteeman
brianteeman - comment - 19 Jun 2023

@webgras are you able to share a copy of the non-upgraded site?

avatar webgras
webgras - comment - 19 Jun 2023

I will try. I have to remove the people's data first, but I have a backup I can use locally for this.

avatar obuisard
obuisard - comment - 18 Jul 2023

I just experienced the same issue for the first time. Migration from 3.10.11 to 4.3.3.
All com_contact files are there, it is just missing the menu items for fields and groups views.

My temporary fix has been to compare the 'menus' table with another 'clean' instance of Joomla 4 (a site not gone through migration).
Then injected the missing SQL

INSERT INTO `#__menu` (`menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`, `publish_up`, `publish_down`) VALUES
('main', 'mod_menu_fields', 'Contact Custom Fields', '', 'contact/Custom Fields', 'index.php?option=com_fields&context=com_contact.contact', 'component', 1, 7, 2, 29, NULL, NULL, 0, 0, 'class:messages-add', 0, '', 16, 17, 0, '*', 1, NULL, NULL),
('main', 'mod_menu_fields_group', 'Contact Custom Fields Group', '', 'contact/Custom Fields Group', 'index.php?option=com_fields&view=groups&context=com_contact.contact', 'component', 1, 7, 2, 29, NULL, NULL, 0, 0, 'class:messages-add', 0, '', 18, 19, 0, '*', 1, NULL, NULL);

Of course, this totally ignores the order parameters (columns lft and rgt have the wrong values) and the result is that I get menu items in the wrong order under 'Contacts'. But at least, I have the menu items in. I have not yet looked at the code, just reporting that this is more common than we would think.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39517.

avatar brianteeman
brianteeman - comment - 18 Jul 2023

@obuisard do you have a backup of the j3 site to share. So far no one has provided one which has made it impossible to debug

avatar brianteeman
brianteeman - comment - 18 Jul 2023

Also please check the content of the update log

avatar obuisard
obuisard - comment - 18 Jul 2023

Yes, I have the original site before migration Brian @brianteeman (actually testing my own site's migration before the big jump). I would have to purge sensitive data first though...

The update log file shows all queries that were run, there is no indication of any of the queries to have failed.
There is no 'insert' made to the menu table according to the log file when it comes to com_contact.

Looking through all update files, I don't see any query that would inject the missing views (those views being non-existent in Joomla 3, one can only access the fields and groups pages from the Contacts or Categories page). The menu items are only inserted in the menu table on a clean install.

I am probably missing something...

avatar brianteeman
brianteeman - comment - 1 Aug 2023

Really hard to help people on this if they dont provide the requested data

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 2 Aug 2023

Hello,
I think i can find the copy of our website in its old configuration on 28 december 2021 (32 bits, PHP 7.3.3, Joomla 3.10.4) before migration to 64 bits, PHP 8.1 and Joomla 4.0.5 (I come back to PHP 8.0 later because of some deprecated errors)
Do you think if i give you this original configuration, you can migrate it to Joomla 4 and discover why our actual website has this problem ?
If Yes, tell we if WeTransfer is Ok for you ? I think i have your email from a previous problem
Best regards

avatar brianteeman
brianteeman - comment - 2 Aug 2023

If I have the site then I can see if I can find the cause of the problem.

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 2 Aug 2023

Our actual website is at the beginning of this issue : www.o2c-sc.com
I can give you a temporary admin password as we have ever done for a previous problem

avatar brianteeman
brianteeman - comment - 2 Aug 2023

I mean if i can see the site before upgrade, try the upgrade myself and log whjat happens during it

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 2 Aug 2023

The original website does not exist any more except a ftp copy than i can zip and sent to you

avatar brianteeman
brianteeman - comment - 2 Aug 2023

as long as it includes the database backup as well then that would be great

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 2 Aug 2023

Ok, I search for this ftp copy

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 2 Aug 2023

Ok, I have find it. I have done a zip - the website is complete but i do not know where is the database !

avatar brianteeman
brianteeman - comment - 2 Aug 2023

Without the database I can't do anything, sorry

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 2 Aug 2023

Shit. The database is not included in the ftp copy and i have no more copy of it ... and the problem is linked to the database ...
I have clean the database at the end of 2022 for a problem of capacity => all the old datas are off

avatar obuisard
obuisard - comment - 3 Aug 2023

I have been spending some more time trying to figure out what is wrong here.
It turns out all finder sub-menus are also missing after the migration from Joomla 3 to 4 (not only the contact custom field sub-menus).

I went to administration/com_admin where the scripts for updating contacts and finder menu items are located (in script.php).
After detailed verification between sites that went through the migration fine and my (failed) migration, I can conclude that the postflight from script.php either has not been called or has returned before doing anything.

When postflight is not run:

  • the table _content_types is not updated
  • the menu items for contact and finder component are missing

I will go through the migration again and backup the website just before moving to 4, so I can have a starting point I can share if needed.

avatar brianteeman
brianteeman - comment - 4 Aug 2023

@obuisard thats exactly what I expect

the questions and issue to resolve is
Did the migration indicate there was a failure or not? Often errors are ignored by the user as they think it all worked.
If there was no indication can we fix the code so an error is reported?
If this part of the postflight didnt run was there anything else that didnt?
Can we find out why the migration failed?

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 4 Aug 2023

Hello Brian,

During our migration, we do not have any problem indication nor error code.
After the migration, during exploitation of our website, we received a deprecated error from PHP so we go back to PHP 7.0 (migration with PHP 7.1) which solve this kind of error.
Can we launch manually the PHP script found by @obuisard in administration/com_admin to solve the problem in parallel of your code analysis ?

Best regards

avatar obuisard
obuisard - comment - 10 Aug 2023

OK, I will try and explain what I went through.

I have re-tested the migration of the site where I had the problem with missing menus.
I got the site to the point where it needed to migrate to Joomla 4. Made a backup and started the migration.
Ultimately, it FAILED at the end. One of the extensions I am using generated an error.
The migration seemed to have gone through, the log files are 'clean', no error whatsoever (administrator/logs/joomla_update.php).
But because of that extension 'failing', the migration actually did not go through the last few steps (post-install script of the migration). The failure actually happens when the update controller redirects the URL to the Joomla update page.

The last 4 steps of the migration to Joomla 4 did not run:

  • update of the content_types table,
  • addition of the contact field sub-menus,
  • addition of the smart search sub-menus.
  • flush of the version number.

I did do another test run, disabling the extension that was generating the error.
The migration went perfectly fine.

I think the upmost attention must be done when migrating to Joomla 4.
Especially: disable any third-party extension that could be problematic when landing into the Joomla 4 dashboard.

On my list of things to do before selecting the button for the migration:

  • disable all system plugins that are not core Joomla,
  • disable all quickicon plugins that are not core Joomla,
  • disable content plugins that are not core Joomla (step I did not do and this is the one that created the error I got),
  • disable any admin module that adds functionality to the dashboard (because it's harder to fix things if the dashboard is not accessible),
  • TURN ON debug mode and error reporting to get errors if there are some or else you may never know what happens.

Test the migration until you are certain it went through fine (hint: if Smart Search has no sub-menu, it did not go all the way through).

avatar obuisard
obuisard - comment - 10 Aug 2023

Can we launch manually the PHP script found by @obuisard in administration/com_admin to solve the problem in parallel of your code analysis ?

@OlivierCARRE-O2C I have created a patch that runs the last 4 steps of the migration I identified for not going through.
However, I am not certain I should make this patch available. That could help sites that are now under Joomla 4 and live, but I would rather people test their migrations before relying on such a patch...
AND I cannot be 100% sure that the update went through all steps up to the post-install script before it stopped...

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 11 Aug 2023

Hello Olivier,
Our website is under Joomla 4 since 2 years and a half.
Everything works and we have no error except this problem so I am ready to test your solution

avatar brianteeman
brianteeman - comment - 11 Aug 2023

The migration seemed to have gone through, the log files are 'clean', no error whatsoever (administrator/logs/joomla_update.php).

Exactly as I thought.

I bet in the update log you did not have the final line
Update to version 4.3.3 is complete.

What we need to do, and I have said for a long time, is to have that line in the UI and not the logs AND if it is not present in the logs then we MUST output an error message in the UI which we don't.

Almost everyday I see people (even experienced people like yourselves) saying that the update was completed successfuly but .... insert something that they had to fix here

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 11 Aug 2023

Sure we have not checked for the log file after migration, we have just looked for message on the screen.
If I look for the last update log (to 4.3.3), it is Ok ...

avatar obuisard
obuisard - comment - 11 Aug 2023

I bet in the update log you did not have the final line Update to version 4.3.3 is complete.

Brian @brianteeman the logs (when failing) show:

End of SQL updates.
Deleting removed files and folders.

And are missing

Cleaning up after installation.
Update to version 4.3.3 is complete.

However, the install goes all the way to the 'complete' screen, which shows Update to version 4.3.3 is complete. despite the fact it did not go all the way through.

So yes, the Joomla update is missing a warning... Maybe, at least, have a session variable that would be set to 'true' only after the last step of the migration has been completed and when redirected to the 'complete' view, test that value to show an appropriate message?

Not everyone checks logs for sure and when I did check mine, I did not see any error at the time. It was just missing a couple lines I did not pay attention to.

avatar brianteeman
brianteeman - comment - 11 Aug 2023

So yes, the Joomla update is missing a warning... Maybe, at least, have a session variable that would be set to 'true' only after the last step of the migration has been completed and when redirected to the 'complete' view, test that value to show an appropriate message?

Yes thats exactly what I suggested.

Not everyone checks logs for sure and when I did check mine, I did not see any error at the time. It was just missing a couple lines I did not pay attention to.

Even checking the logs wouldnt have helped you if you didnt already know what the last line should be

avatar obuisard
obuisard - comment - 11 Aug 2023

Hello Olivier, Our website is under Joomla 4 since 2 years and a half. Everything works and we have no error except this problem so I am ready to test your solution

I don't see you on Mattermost @OlivierCARRE-O2C. Please contact me personally (check my GitHub profile for the email address) so I can send you the patch. Even though the patch is 'harmless' (it launches the post-install script), I strongly suggest a backup be done before applying it.

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 14 Aug 2023

@brianteeman , Olivier BUISARD send me his script but it does work because he create it to correct a website which is just migrate from Joomla 3.x to Joomla 4.3.3 but it is not our case.
So thank you to add some explicit message to close correctly a migration for future users and if you have a solution to finish the migration on our website, I will be interested. Best regards, Olivier

avatar OlivierCARRE-O2C
OlivierCARRE-O2C - comment - 19 Aug 2023

Thank you to @obuisard to solve the problem of its patch. It works well and add menus to Joomla 4.3

avatar brianteeman brianteeman - change - 30 Aug 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-08-30 06:31:41
Closed_By brianteeman
avatar brianteeman brianteeman - close - 30 Aug 2023
avatar brianteeman
brianteeman - comment - 30 Aug 2023

I am going to close this. The problem has been identified (update not completing) and a pull request to increase the visibiity of an update that does not complete has been created.

Add a Comment

Login with GitHub to post a comment