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

include layer opacity info for embedded layers #5011

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

mind84
Copy link
Contributor

@mind84 mind84 commented Nov 27, 2024

Backport for #4964

Funded by Faunalia

@github-actions github-actions bot added this to the 3.8.4 milestone Nov 27, 2024
@Gustry Gustry added run end2end If the PR must run end2end tests or not legend/layer tree Tool which displays the layer tree with legends labels Nov 27, 2024
Copy link
Member

@Gustry Gustry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM according to LGTM on the parent PR ;-)

@Gustry Gustry merged commit a786916 into 3liz:release_3_8 Nov 27, 2024
15 checks passed
@mind84 mind84 deleted the backport_3_8_embedded_opacity branch November 27, 2024 17:16
@Gustry
Copy link
Member

Gustry commented Dec 2, 2024

I wonder how CI could pass, I'm confused as well, from other PR on the 3.8 branch.

But now, when I'm on the landing page, I have a 500 error from PHP :

[0]	Call to a member function xpath() on null
  /srv/lzm/lizmap/modules/lizmap/lib/Project/QgisProject.php	654
 /
 array (   'module' => 'view',   'action' => 'default:index', )
 ref:Unknown referer

	0	Lizmap\Project\QgisProject->xpathQuery()	/srv/lzm/lizmap/modules/lizmap/lib/Project/QgisProject.php : 390
	1	Lizmap\Project\QgisProject->setLayerOpacity()	/srv/lzm/lizmap/modules/lizmap/lib/Project/QgisProject.php : 346
	2	Lizmap\Project\QgisProject->setPropertiesAfterRead()	/srv/lzm/lizmap/modules/lizmap/lib/Project/Project.php : 236
	3	Lizmap\Project\Project->readProject()	/srv/lzm/lizmap/modules/lizmap/lib/Project/Project.php : 148
	4	Lizmap\Project\Project->__construct()	/srv/lzm/lizmap/modules/lizmap/lib/Project/Repository.php : 294
	5	Lizmap\Project\Repository->getProject()	/srv/lzm/lizmap/modules/lizmap/lib/Project/Repository.php : 388
	6	Lizmap\Project\Repository->getProjectsMetadata()	/srv/lzm/lizmap/modules/lizmap/classes/lizmapRepository.class.php : 166
	7	lizmapRepository->getProjectsMetadata()	/srv/lzm/lizmap/modules/view/zones/main_view.zone.php : 64
	8	main_viewZone->_prepareTpl()	/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 282
	9	jZone->_createContent()	/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 217
	10	jZone->getContent()	/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 373
	11	jZone::_callZone()	/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 114
	12	jZone::get()	/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/tpl/jTpl.class.php : 52
	13	jTpl->assignZone()	/srv/lzm/lizmap/modules/view/controllers/default.classic.php : 158
	14	defaultCtrl->index()	/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/core/jCoordinator.class.php : 266
	15	jCoordinator->process()	/srv/lzm/lizmap/www/index.php : 23

Which looks linked to this PR ?

Am I wrong ?

@mind84
Copy link
Contributor Author

mind84 commented Dec 3, 2024

Hi @Gustry,

I'm surprised too!

Anyway, the issue is related to the xpathQuery function, it's different between versions:

versions >= 3.9:

$ret = $this->getXml()->xpath($query);

version 3.8:

Basically in 3.8 the property $xml is accessed directly while in newer versions Lizmap first checks if this property exists.

This is the commit:

1e9be74

Maybe coluld be backported to 3.8? Any drawbaks? @rldhont,

@rldhont
Copy link
Collaborator

rldhont commented Dec 3, 2024

@mind84 the commit 1e9be74 is part of #4765 and was made has a first step for #4819

If you can provide a fix to release_3_8, it's welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legend/layer tree Tool which displays the layer tree with legends run end2end If the PR must run end2end tests or not
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants