You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
When you are rebuilding the search index in the maintenance section, the indexComplete message is sometimes shown too early, before all requests for all pages are finished. It's more likely to happen if you either have a lot of pages or at least some pages that take a long time to generate.
Reproduction
create a new file named sleep.php in your /templates directory and insert the following content: <?php session_write_close(); sleep(25); - change the number of seconds to sleep to something sufficiently high, if necessary.
create a new HTML content element on your index page for example and insert {{file::sleep.php}}. If you want, add this script to a few other pages as well.
go to System - Maintenance and click on "Rebuild index"
The message "The search index has been rebuilt. You can now proceed." will be shown, even though not all pages have been processed yet.
Cause
The logic of the MooTools script shows the message once the request of the last element in the list of URLs is completed.
However, the last request in the list of URLs is not necessarily the last request to be finished overall. The requests could be executed out of order by the Browser and, as shown with the reproduction above, some pages may take longer to generate, e.g. longer than the request of the last element in the list.
Fix
Exchange the current script in be_rebuild_index.html5 with this:
### 4.1.2 (2016-03-22)
* Handle derived classes in the exception converter (see #462).
* Prevent the autofocus attribute from being added multiple times (see contao/core#8281).
* Respect the SSL settings of the root page when generating sitemaps (see contao/core#8270).
* Read from the temporary file if it has not been closed yet (see contao/core#8269).
* Always use HTTPS if the target server supports SSL connections (see contao/core#8183).
* Adjust the meta wizard field length to the column length (see contao/core#8277).
* Correctly handle custom mime icon paths (see contao/core#8275).
* Show the 404 error page if an unpublished article is requested (see contao/core#8264).
* Correctly count the URLs when rebuilding the search index (see contao/core#8262).
* Ensure that every image has a width and height attribute (see contao/core#8162).
* Set the correct mime type when embedding SVG images (see contao/core#8245).
* Handle the "float_left" and "float_right" classes in the back end (see contao/core#8239).
* Consider the fallback language if a page alias is ambiguous (see contao/core#8142).
* Fix the error 403/404 redirect (see contao/website#74).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Problem
When you are rebuilding the search index in the maintenance section, the
indexCompletemessage is sometimes shown too early, before all requests for all pages are finished. It's more likely to happen if you either have a lot of pages or at least some pages that take a long time to generate.Reproduction
sleep.phpin your/templatesdirectory and insert the following content:<?php session_write_close(); sleep(25);- change the number of seconds to sleep to something sufficiently high, if necessary.{{file::sleep.php}}. If you want, add this script to a few other pages as well.Cause
The logic of the MooTools script shows the message once the request of the last element in the list of URLs is completed.
However, the last request in the list of URLs is not necessarily the last request to be finished overall. The requests could be executed out of order by the Browser and, as shown with the reproduction above, some pages may take longer to generate, e.g. longer than the request of the last element in the list.
Fix
Exchange the current script in
be_rebuild_index.html5with this:Or, while you are at it, use the script from #8255 which introduces more feedback.
The text was updated successfully, but these errors were encountered: