#1439 ✓resolved

British Trolleybus Society - Can't Add Modules

Reported by Peter | October 15th, 2018 @ 09:23 AM | in 2.5.2 (closed)

At some point in the last month or so, a problem has occurred which has only just been noticed.

It is no longer possible to add new modules to a page. You go through the screen for adding the module, but when you OK back it's not there.

I can send you a login password for user lighthouse - please confirm how to do this securely.


Comments and changes to this ticket

  • Peter
  • dleffler
  • dleffler

    dleffler October 23rd, 2018 @ 12:03 PM

    • Milestone set to User issues

    I suspect the server was upgraded to mysql v5.7 and the new default of 'strict' mode prevents creating records. For the fix see http://forums.exponentcms.org/discussion/1556/fix-problems-running-...

  • Peter

    Peter October 23rd, 2018 @ 12:19 PM

    I've escalated this to UK2 2nd line support, still awaiting a response. Peter.

  • dleffler

    dleffler November 15th, 2018 @ 01:44 PM

    • State changed from “new” to “knownissue”
  • Peter

    Peter November 15th, 2018 @ 01:51 PM

    Just to complete the picture from this end: UK2 made the change to strict on MySQL with a PHP update. They are not prepared to revert. As a temporary measure I have moved the database only to my Fasthosts account. Update capabilities are restored, but it runs noticeably slower with the db not in-house at UK2.

  • Peter

    Peter October 29th, 2019 @ 02:48 PM

    Hi Dave. I've not been able to keep tabs on this since a year ago. As we left it, I moved the MySQL database to another platform as the web site host had updated MySQL to enforce Strict. With no access to the actual (shared) server, we've lived with this since - works fine although doing updates is a bit slow!

    Is this an issue that you may have resolved in the last year, is it perhaps in 2.5.1? When will that be available please? I'm still at 2.4.2.

    I am currently handing over to a new Webmaster, so am trying to sort out what he may need to do!!

    Many thanks.

  • Peter

    Peter December 9th, 2019 @ 04:52 PM

    Hi Dave. I appreciate you're busy, but now I've handed over my webmaster duties I am still left with the responsibility of sorting out this issue. At some point in the not-too-distant future I'd really like to get the database moved back to the same provider as Exponent. Right now the database is on my own account at Fasthosts where I can't allow the new webmaster access.

    Please could you let me know if this issue has been resolved in any updates or is it still outstanding? If the latter, when might it be resolved please? It's over a year since the last update.


  • dleffler

    dleffler December 9th, 2019 @ 05:37 PM

    There have really been not changes in this area of code. I was able to get my shared host provider to change the my.ini setting since many different apps doe NOT work under mysql strict mode

  • Peter

    Peter December 10th, 2019 @ 09:45 AM

    I did try this, but they refused. I can try again, but don't hold your breath! Peter.

  • Peter

    Peter March 5th, 2020 @ 02:08 PM

    Hi Dave. Just looked at the changes in the new release 2.5.x - no mention of this issue so I wondered if there's any plans to fix it in the code please??

    I have been around the houses again pn changing sql_mode without success. I've looked at alternative ISPs but am left with Fasthosts hosting the database and the site at UK2. Nobody wants to change their shared servers. The only way I can potentially get everything back under one roof is to rent a VPS and transfer into that. Because this site is for a charity with limited resources, it is doubtful they will fund the somewhat higher costs.

    I do hope you can plan this in soon.


  • dleffler

    dleffler March 5th, 2020 @ 05:35 PM

    v2.5.1 doesn't include any fix for MySQL 'strict' mode. It's mostly a set of patches but all the files had the copyright updated to 2020 so was released as a full version.

  • Peter

    Peter March 5th, 2020 @ 05:43 PM

    Yes, I understand that and did say so. My question was, do you have any plans to fix this long-standing problem that puts us at the mercy of inflexible ISPs?


  • dleffler

    dleffler March 10th, 2020 @ 07:14 PM

    • Milestone changed from User issues to 3.0.0

    I may have a fix. It seems to work locally. It would be 'shipped' as v2.5.1patch1. Not sure if it'd update an existing database, but would likely work to create a new database, then accomplish a restore database using the .eql file backup.

  • dleffler

    dleffler March 10th, 2020 @ 09:49 PM

    I've got another fix which should update an existing db to set/change the Nullable field column.

  • Peter

    Peter March 11th, 2020 @ 09:23 AM

    Sounds hopeful. Thanks. I'll probably need to wait a little while depending when you release. This and next month are the peak times for membership renewals, but then it should quieten down. Peter.

  • dleffler

    dleffler March 12th, 2020 @ 02:30 PM

    • State changed from “knownissue” to “resolved”
    • Milestone changed from 3.0.0 to 2.5.2

    Recent code push now works with MySQL in 'strict' mode

  • Peter

    Peter September 6th, 2020 @ 09:13 AM

    Hi. You marked this as Resolved and said it would be fixed in 2.5.2, which would be available late 2020. I've just checked status and see you are now saying December 2021. This is becoming an issue at this end, as I have had to pass site support to someone else, but am still running the MySQL database on my own web space. I must get this resolved so I can help the new support guy to migrate the database to the web site ISP and free up my own resources.

    Is there any way you can help me here so I don't have to continue my involvement with this web site for another 15+ months?

    Thank you.

  • dleffler

    dleffler September 6th, 2020 @ 11:36 AM

    Support for MySQL 'strict' mode was added in v2.5.1 with many regression bug fixes in v2.5.1 patches 1 & 2 (current release is patch 3)

    I've had no issues with it locally, but mostly run WITHOUT 'strict' mode on day-to-day as several installations I support run on older versions of Exponent.

    If you install v2.5.1 patch 2 and successfully complete the upgrade routine which updates the tables, it should work. This will adjust the database table structure to accommodate the needed changes (column null and default value settings).

    Additionally, it should work even better when 'error reporting' is turned off since we also insert the 'IGNORE' keyword for insert and update mysql actions to force it to work in strict mode.

    If 'error reporting' is turned on and the system encounters an issue with the insert or update mysql action there will be an error output to the /tmp/exponent.log file with details about what the system was trying to do (insertObject/updateObject/sql Error)

  • Peter

    Peter September 6th, 2020 @ 12:31 PM

    Thanks for the prompt reply. I obviously didn't understand your comment about recent code push. I wish I'd realised a lot sooner, but hey, we are where we are.

    I'm not sure how to manage the upgrade with the database currently somewhere entirely different from the website.

    So I guess I need to create a new database on the web site server and populate it by copying all the data across from my own server. Then presumably I can point Exponent to the new database, run the 2.5.1 plus patches followed by the database update. However this is a live site so not sure if we can take it down for long. Of course I'm always nervous about upgrades in case something goes wrong....

    Any advice you can give would be gratefully appreciated! It's so long since I did the last upgrade I can't remember the procedure! Is it feasible to do this with minimum downtime?

    BTW - I replied to the email 'above the line' but it got bounced as you used a 'noreply' address.

  • Peter

    Peter September 25th, 2020 @ 11:03 AM

    Today I uploaded all of the 2.5.1 files and changed the folder permissions to 775 as shown in the guide.

    I am logged in as super admin. Entering https://www.britishtrolley.org.uk/install/index.php produces a Page Not Found error. The folder and file are there.

    HELP please!!

  • dleffler

    dleffler September 25th, 2020 @ 11:35 AM

    Is this an Apache web server? (not NGINX nor IIS) My first guess is the main .htaccess file has been altered for that file/folder and access deny'd? (There is NO .htaccess file shipped for within the /install folder) Are you able to view existing pages on the site?

  • Peter

    Peter September 25th, 2020 @ 12:22 PM

    I replied to your emails but they got sent back just now.

    As far as I can tell this is an Apache server.

    Attached is the main htaccess file. There isn't one in Install.

    Web site is still working. Version shown from the Exponent pull-down when logged in is 2.5.1

    Interestingly, before uploading the files I could not add a module (original problem) but after upload I can create and edit a new module.

    I tried putting a test file in Install with a meta redirect. The html file loads, displays a text message in its body then when it redirects I still get 'page not found'. So the folder and index.php are being accessed.

    One more question: Exponent shares its database now with the membership system. Am I right to assume that your updates only affect the Exponent tables and leave everything else in the database as-is?

  • Peter

    Peter September 25th, 2020 @ 12:31 PM

    Doesn't seem to want to process the htaccess file, here's the contents:

    Don't show directory listings.

    Options -Indexes

    Route requests to Exponent.

    DirectoryIndex index.php

    Various rewrite rules.

    RewriteEngine On

    # you may have to edit/uncomment the next line if running eXp from a subfolder

    RewriteBase /subfolder-name

    # if moving eXp from a subfolder to root, edit/uncomment ONLY one of the next 3 lines

    Redirect 301 /testfolder http://yourdomain.org/

    RedirectMatch 301 ^/testfolder/$ http://yourdomain.org/

    RewriteRule ^testfolder/(.*)$ /$1 [R=301,NC,L]

    # To redirect all users to access the site WITH the 'www.' prefix,
    # (http://example.com/... will be redirected to http://www.example.com/...)
    # uncomment and adapt the following:

    RewriteCond %{HTTP_HOST} ^example.com$ [NC]

    RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

    # To redirect all users to access the site WITHOUT the 'www.' prefix,
    # (http://www.example.com/... will be redirected to http://example.com/...)
    # uncomment and adapt the following:

    RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]

    RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

    # To force the domain to serve the site securely using HTTPS,
    # (http://www.example.com/... will be redirected to https://www.example.com/...)
    # uncomment and adapt the following:

    RewriteCond %{HTTPS} !=on

    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    RewriteRule ^.*\.git.* - [R=404]

    the next two lines will dish out .html pages if they exist, which may not be a desired effect!

    RewriteRule ^$ index.html [QSA]
    RewriteRule ^([^.]+)$ $1.html [QSA]
    # RewriteRule ^login.php$ login/showlogin
    # Kludge out certain file types that we don't want to try to route thru the eXp router.
    RewriteCond %{REQUEST_URI} !\.(css|js|pdf|shtml|htc|map)$ [NC]
    # Kludge out image files that we don't want to try to route thru the eXp router.
    RewriteCond %{REQUEST_URI} !\.(jp?g|gif|png|tiff)$ [NC]
    # Kludge out media files that we don't want to try to route thru the eXp router.
    RewriteCond %{REQUEST_URI} !\.(mp3|mp4|webm|ogv|flv|f4v)$ [NC]
    # Kludge out certain other misc files that we don't want to try to route thru the eXp router.
    RewriteCond %{REQUEST_URI} !^/robots\.txt$ [NC]
    RewriteCond %{REQUEST_URI} !^/favicon\.ico$ [NC]
    # These rules basically state if it isn't an existing file, directory or symlink, route it to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.*)$ index.php [QSA,L]

    ErrorDocument 403 /index.php?controller=notfound&action=handle_not_authorized&error=403
    ErrorDocument 404 /index.php?controller=notfound&action=handle&error=404
    ErrorDocument 500 /index.php?controller=notfound&action=handle_internal_error&error=500

  • Peter

    Peter September 29th, 2020 @ 08:32 AM

    PLEASE could you give me some clues as to why the install won't run? I need to get this done and Patch 3 installed so they can do some more updates.

    Thank you!

  • dleffler

    dleffler September 29th, 2020 @ 12:48 PM

    There's nothing in the 'install/upgrade' routine that should return that specific error. It's a general error for when the web server returns a '404' not found error...a 'read' error not a 'write' error.

    E.g., if there was a problem with installation or upgrade you'd get a specific note of the issue or simply be taken back to the home page without complaint if it were a user permission problem.

    Some things I would try in a test:
    - double-check to ensure the /install/index.php file has 'read' permissions (at least 555) - TEMPORARILY change the folder/file permissions to the /install folder/subfolders to 777 - create a very simple html file (index.htm attached) to display 'hello' and place it within the /install folder then try to load it (https://www.britishtrolley.org.uk/install/index.htm)

    I tried to load several other .php file from YOUR /install folder which should display a blue background, etc... and received the same 404 error. I tried to load a .txt file from the changes subfolder and it LOADED. I'm thinking there is something on the main server settings that prohibits/deny's loading .php files from an /install folder

    ONE THING YOU MIGHT TRY: rename the /install folder to something else and then run the newly formed url...this shouldn't affect anything except the 'upgrade' notice link won't work nor the ability to run the 'upgrade' scripts manually.

  • Peter

    Peter September 29th, 2020 @ 01:03 PM

    Thanks. Still no luck.

    • Changed permissions on install folder to 777

    • index.html file loads OK

    • Renamed install folder to expinstall - same error

    I also ran through all of the files that are called from index.php and below, checked permissions and don't see a problem. I must have run install when I set the system up on this server, so it's weird it won't run now.

  • Peter

    Peter September 29th, 2020 @ 01:10 PM

    Just tried a test php file with one line to display a message. Also get page not found...

    I am now doing live chat with UK2 support...

    live chat have seen the problem and asked me to open a ticket so they can escalate to higher level. This now done, so we'll see what they find. I'll let you know, meanwhile if you have any more thoughts please let me know.

  • Peter

    Peter October 2nd, 2020 @ 10:45 AM

    UK2 determined that the reason I couldn't run php files from the install folder was because something in your .htaccess that came with the update was stopping it. They put some default .htaccess there instead and php files run OK.

    I logged in and ran the install index.php. This time it returned me to the site home page without the logged in top bar. I have put the original .htaccess from the update back and I get the same result again. Maybe they fixed something then blamed it on .htaccess??

    The question now is - is this the correct action when you run install/index.php or should there be other steps involved? I thought it should run through a whole upgrade process with you?

    How do I confirm if the upgrade has been done properly? Am I OK to do Patch 3 at this stage?


  • dleffler

    dleffler October 3rd, 2020 @ 02:43 PM

    So are you saying the upgrade process ran though several of the steps, but when it finished it took you back to the main page but you were logged out? Or it simply takes you back to the main page...I'd use our .htaccess file. You can simulate the upgrade by:

    • Log in as the super-admin
    • Run the Exponent - Super-Admin Tools - Database - Update Tables command which will update the tables to work with strict mode
    • Run the Exponent - Super-Admin Tools - Extensions - Run Upgrade Scripts command and select and run the following scripts

      • Remove old files
      • Clear the Caches
      • Update the Core CSS Files
      • Update Version Information
  • Peter

    Peter October 3rd, 2020 @ 02:49 PM

    No, it ran through none of the steps and just returned me to the home page without the logged in top bar.

    I'll go through your steps and report back.


  • Peter

    Peter October 3rd, 2020 @ 02:56 PM

    OK that went through OK until the last screen which lost its formatting, see attached. After closing and reopening browser it seems OK again.

    I did put your original .htaccess back yesterday.

    So it looks like we're now at 2.5.1 ? I'll try and do the patch later.

  • dleffler

    dleffler October 3rd, 2020 @ 04:50 PM

    Was that page after the Update Tables or the Run Upgrade Scripts?

    FWIW, Exponent is designed so that you don't have to perform incremental upgrade...you simply extract the latest full version package AND the latest patch file, THEN you can run a single upgrade...that would work even if you were upgrading from v2.0.0beta1.

  • Peter

    Peter October 3rd, 2020 @ 06:06 PM

    That was after Run Upgrade Scripts.

    I have now installed Patch 3 and all is well. Phew! I didn't realise you could do the patch at the same time. The documentation doesn't seem to mention patches so I was being careful!

    Thanks for your help. I've documented everything for the new support guy, and I'm here as backup if needed.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Bug Tracker for Exponent CMS

Shared Ticket Bins

People watching this ticket