Open volodymyrss opened 4 months ago
I confirm that this is the case. Nothing was apparently upgraded on frontend, but this functionality stopped working. There are some errors in JS. Could you check @burnout87 , @motame ?
the link does not work, how can I reproduce it? just any request ?
the link does not work,
why? probably some permissions missing? What is needed to view this submission, @motame ?
how can I reproduce it? just any request ?
Yes. Try with the default.
the link does not work,
why? probably some permissions missing? What is needed to view this submission, @motame ?
ok iI can see it now, just rushed in replying
I did some testing locally as well as on the production. It's weird but it works properly locally.
The Drupal.settings.mmoda
object is properly built and read at the latest version, whereas this doesn't happen on the production.
So I suspect that that object (built on the backend side, PHP, to hold some configuration and settings, and read on the frontend side, javascript) is built with n older approach but read with a newer one, causing the issue.
Did the way the Drupal.settings.mmoda
object is built on the backend change @motame ?
I confirm that it's working properly on dev instance. @burnout87, no, it did not change since the feature "enable use catalog" has been implemented.
And then why the Drupal.settings.mmoda
on the production is an array, when it should be an object ?
And then why the
Drupal.settings.mmoda
on the production is an array, when it should be an object ?
I noticed that too ... It has been all the time an object and not an array. It's quite strange ! I compared right now the code of mmoda.module with a version dating 2 years ago and it is an object.
I confirm that it's working properly on dev instance. @burnout87, no, it did not change since the feature "enable use catalog" has been implemented.
I suppose on dev instance you have a recent version of the code?
Yes, the latest one but as mentioned above, this part of the code did not change from a while (~2 years)
Locally I am also testing with the latest one
The version in the production frontend did not change since a while. Is there a way to know reasonably easily why it broke?
Did the way the
Drupal.settings.mmoda
object is built on the backend change @motame ?
In both places it's in fact an array indexed by the instrument short name.
It has been like that since more than 2 years as attested by a diff with the commit f86561a.
However on prod, the array is indexed by numeric values (0,1,2 ...) !!
That object is built in the backend starting from the mmoda_settings
object:
$mmoda_settings = variable_get('mmoda_settings');
Where is that variable loaded?
Where is that variable loaded?
It's an object storing all mmoda config, core and modules. It's initialized during modules installation and it is stored in the db, table "variable" as a serialized object in a BLOB. The issue could be there. ... it's not properly initialized.
May be reinstalling the modules will fix the issue. @volodymyrss, note that disabling a module (drush dis -y module_name) does not uninstall it. To reinstall a module :
In addition to that the "drush pmu" command should respect the module dependency. To uninstall mmoda_integral, the sub-modules mmoda_isgri, mmoda_jemx and mmoda_spi_acs should be uninstalled first.
- drush pmu module_name
I uninstalled and re-installed all modules. Does this log look right?
Do you really want to continue? (y/n): y
mmoda_antares was successfully uninstalled. [ok]
mmoda_isgri was successfully uninstalled. [ok]
mmoda_jemx was successfully uninstalled. [ok]
mmoda_polar was successfully uninstalled. [ok]
mmoda_spi_acs was successfully uninstalled. [ok]
mmoda_legacysurvey was successfully uninstalled. [ok]
mmoda_gw was successfully uninstalled. [ok]
The following modules will be uninstalled: mmoda_integral
Do you really want to continue? (y/n): y
mmoda_integral was successfully uninstalled. [ok]
The following modules will be uninstalled: mmoda
Do you really want to continue? (y/n): y
mmoda was successfully uninstalled. [ok]
But it still does not help.
https://www.astro.unige.ch/mmoda/node/383/submission/147
reported by @jywoo0116