Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23064

Legacy script doesn't always receive --siteaccess option

    XMLWordPrintable

    Details

    • Sprint:
      Castor Core S1

      Description

      When running legacy scripts from ezpublish/console it is not possible to index content to Solr without interaction.

      So, we will always be asked to provide a siteaccess when running the following commands:

      php ezpublish/console ezpublish:legacy:script --env=dev -n extension/ezfind/bin/php/updatesearchindexsolr.php
      php ezpublish/console ezpublish:legacy:script --env=dev --siteaccess=ezdemo_site_admin extension/ezfind/bin/php/updatesearchindexsolr.php
      

      Which return the following output:

      Running script 'extension/ezfind/bin/php/updatesearchindexsolr.php' in eZ Publish legacy context
      You did not specify a siteaccess. The admin siteaccess is a required option in most cases.
      Are you sure the default siteaccess has all available languages defined? ([y] or [q] to quit )
      

      We are asked to provide the siteaccess, even when running it with --siteaccess=ezdemo_site_admin

      Which doesn't seems right.

      A workaround exists, which consists on adding the siteaccess after the script path:

      php ezpublish/console ezpublish:legacy:script --env=dev extension/ezfind/bin/php/updatesearchindexsolr.php --siteaccess=ezdemo_site_admin
      

      Legacy scripts, when called from the console, should be aware of the siteaccess when we specify it.

      This will probably affect other scripts as well.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              ricardo.correia-obsolete@ez.no Ricardo Correia (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 30 minutes
                  2h 30m