Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.5.0.2 Seach Engine Friendly URLs Not Enabling #1441

Closed
diatonic opened this issue Aug 8, 2023 · 2 comments
Closed

Version 2.5.0.2 Seach Engine Friendly URLs Not Enabling #1441

diatonic opened this issue Aug 8, 2023 · 2 comments
Assignees
Labels
bug confirmed Bug report confirmed in test environment in latest master commit Fix is in latest commit to master. Not in release. v2.6.0

Comments

@diatonic
Copy link

diatonic commented Aug 8, 2023

Reporting About the Latest Version? Yes - Tested on 2.6 as well with same result

Searched Issue Reports for Bug? Yes

Reviewed the Good To Know Issue Reports? Yes

BCOE&M Info
Version: v2.5.0.2
Installation URL: https://idbeer.org
Hosted Installation? No

Describe the Bug
Enabling Search Engine Friendly URLs preference does not affect navigation links, but SEF links are working
image

To Reproduce
Steps to reproduce the behavior:

  1. Go to Website Preferences
  2. Enable Search Engine Friendly URLs
  3. Save Changes
  4. Navigation links are not SEF

Expected Behavior
Search Engine Friendly Links in navigation

Screenshots
image

Server Environment

  • PHP Version: 8.2.5
  • MySQL Version: 10.5.16-MariaDB
  • Other Info: Apache/2.4.53 (AlmaLinux)

Local Environment

  • OS: Windows 11
  • Browser: Edge & Firefox
  • Browser Version: Latest

Additional Context
SEF URLs work on the server, but navigation links continue to not use them

@diatonic
Copy link
Author

diatonic commented Aug 8, 2023

Perhaps related to using an unsupported version of php. Saw that the installation instructions state not to use a version newer than 7.3.X.

geoffhumphrey added a commit that referenced this issue Aug 9, 2023
@geoffhumphrey geoffhumphrey self-assigned this Aug 9, 2023
@geoffhumphrey geoffhumphrey added bug in latest master commit Fix is in latest commit to master. Not in release. confirmed Bug report confirmed in test environment v2.6.0 labels Aug 9, 2023
@geoffhumphrey geoffhumphrey added this to the v2.6.0 Release milestone Aug 9, 2023
@geoffhumphrey
Copy link
Owner

Hi @diatonic - thanks for reporting. If you change lines 164-178 (2.6.0 release) of /lib/common.lib.php to the following, the issue will be resolved:

if ($_SESSION['prefsSEF'] == 'Y') {
	$url = $base_url."";
	if ($section != "default") $url .= $section."/";
	if ($go != "default") $url .= $go."/";
	if ($action != "default") $url .= $action."/";
	if ($id != "default") $url .= $id."/";
	return rtrim($url,"/");
}
	
else {
	$url = $base_url."index.php?section=".$section;
	if ($go != "default") $url .= "&go=".$go;
	if ($action != "default") $url .= "&action=".$action;
	if ($id != "default") $url .= "&id=".$id;
	return $url;
}

Or, simply download and install the entire /lib/common.lib.php file from the latest commit to your installation.

cgspeck pushed a commit to cgspeck/brewcompetitiononlineentry that referenced this issue May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed Bug report confirmed in test environment in latest master commit Fix is in latest commit to master. Not in release. v2.6.0
Projects
None yet
Development

No branches or pull requests

2 participants